On Sunday 09 April 2017 20:46:10 Krzysztof wrote:
> Hi Martin,
> Two questions:
> 1. How to change font color for selected row in twidgetgrid
> (ttreeitemedit)? From tscincontroller. Is there any definded color which I
> can override by setcolormapvalue()? Something like cl_gridselectedtext?

T*Grid.Datacols has FontSelect and FontActiveNum/FontFocusedNum which select 
an item in T*Grid.RowFonts. Please use TSkinController.OnAfterUpdate in order 
to set them. If you solely want to change the font color it is also possible 
to setup the fonts at design time and to define the color by a user color 
(cl_user0..cl_user19) where the rgb value can be defined by 
TSkinController.Colors[n]. The designtime rgb-values of cl_user0..cl_user19 
can be defined in 'Project'-'Options'-'User Colors'.

> 2. Is it possible to set different image for selected row in ttreeitemedit?
> My icons are dark and I would like to set them as "negative" color when
> selected. So it should be also from different timagelist (which I init with
> brighter color). Or some trick to do this on the fly when image is painted.
The selected imagelist item is defined by the sum of 
TTreeItemEdit.ItemList.Imnr_* + the image number of the datanode. TimageList 
can have a lookup table ("IndexLookup") in order to save duplicate images.
On the fly drawing is possible with grid.DataCols[n].OnBeforeDrawcell, 
OnDrawcell and OnAfterDrawcell and T*EditWidget.OnBeforePaint, OnPaint and 


Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
mseide-msegui-talk mailing list

Reply via email to