From: Steve
On Tuesday, September 09, 1997 12:55 PM, David Marcus wrote:
> Anyone have code written that will colour part of a List() in a different
> color from the rest of the list? I have a list of filename names that
> contains a lot of extraneous info. I want to change the color of the file
> names only. I can mark these as a block, but that doesn't help in a list
> display.
>
> thanks in advance
>
> --
> :)
You mean something like this UNDOCUMENTED feature which needs to be put in a
file with an extension of ".si" for it to compile?
proc DisplayFiles(integer is_cursorline)
integer attr
string s[12]
attr = iif(is_cursorline, Color(Bright Yellow on Blue), Color(Green on
Blue))
s = iif(PBAttribute() & _DIRECTORY_, "",Str(PBSize()))
PutStr(Format(s:12,PBDateStr():9,PBTimeStr():9," "), attr)
PutStr(Format(PBName():-128),Color(Red on Blue))
end
proc Main()
PushPosition()
if CreateTempBuffer()
if BuildPickBufferEx("*.*",_NORMAL_ | _DIRECTORY_)
BegFile()
HookDisplay(DisplayFiles,,,)
List("Files",80)
UnHookDisplay()
endif
endif
PopPosition()
end
Well, if I had written an example like this I couldn't tell you since it's
undocumented. (Right, Chris?)
Steve
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|