` Printed Icetips Article

Icetips Article



Browses and Listboxes: Setting styles for individual cells
2002-03-23 -- Steve B.
 
Newsgroups: comp.lang.clarion

> Is it possible, using just Clarion code, to change the font family and style
> of a given cell on a listbox?
>
> Let's say I need to make a column on just one line to be presented in bold.
> Does it have anything to do with the PROPLIST:CellStyle??

Like icons, you need to pre-define the styles you are going to use before
applying them.

?ListProducts{PROPSTYLE:FontName, 1}      = 'Tahoma'                
!setup positive value style
?ListProducts{PROPSTYLE:FontSize, 1}      = 8
?ListProducts{PROPSTYLE:FontStyle, 1}     = FONT:Regular
?ListProducts{PROPSTYLE:TextColor, 1}     = COLOR:None
?ListProducts{PROPSTYLE:BackColor, 1}     = COLOR:None
?ListProducts{PROPSTYLE:TextSelected, 1}  = COLOR:None
?ListProducts{PROPSTYLE:BackSelected, 1}  = COLOR:None
?ListProducts{PROPSTYLE:Picture, 1}       = '@s20'

?ListProducts{PROPSTYLE:FontName, 2}      = 'Tahoma'                
!setup positive value style
?ListProducts{PROPSTYLE:FontSize, 2}      = 8
?ListProducts{PROPSTYLE:FontStyle, 2}     = FONT:Bold
?ListProducts{PROPSTYLE:TextColor, 2}     = COLOR:None
?ListProducts{PROPSTYLE:BackColor, 2}     = COLOR:None
?ListProducts{PROPSTYLE:TextSelected, 2}  = COLOR:None
?ListProducts{PROPSTYLE:BackSelected, 2}  = COLOR:None
?ListProducts{PROPSTYLE:Picture, 2}       = '@s20'

If xxx
  ListQueue.StyleVar = 2
Else
  ListQueue.StyleVar = 1
End

Steve B.



Printed November 23, 2024, 5:52 am
This article has been viewed/printed 35437 times.
Google search has resulted in 31 hits on this article since January 25, 2004.