TIP: Click on subject to list as thread! ANSI
echo: qedit
to: ALL
from: `CHRIS ANTOS (EXCHANGE)`
date: 1997-09-10 05:11:00
subject: RE: Coloring Part of a List?

From: "Chris Antos (Exchange)" 
yep, undocumented, never been done before, and noone knows about it.
(tongue planted firmly in cheek -- i've used this undocumented technique
in 5 or 6 macros, and it's documented in the Help Supplement that comes
with my GetHelp macro).
//chris
> -----Original Message-----
> From:	Steve [SMTP:steve.watkins@semware.com]
> Sent:	Tuesday, September 09, 1997 11:05 AM
> To:	tsepro@semware.com; 'David Marcus'
> Subject:	RE: Coloring Part of a List?
> 
> 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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.