Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
2017-04-18 8:17 GMT+02:00 Martin Schreiber: > > > There is a new property ttreeitemedit.itemlist.colorlineactive. Please > set it > to cl_none. Thanks! -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
On Monday 17 April 2017 20:02:55 Krzysztof wrote: > > Many thanks! Noticed something strange after this update. See attached > screens. Root lines appears on selected nodes, I don't think they were > earlier There is a new property ttreeitemedit.itemlist.colorlineactive. Please set it to cl_none. Martin -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
On Friday 14 April 2017 18:11:20 Martin Schreiber wrote: > On Friday 14 April 2017 17:57:44 Krzysztof wrote: > > 2017-04-14 13:55 GMT+02:00 Martin Schreiber: > > > On Friday 14 April 2017 12:43:01 Krzysztof wrote: > > > > Thanks a lot! Only one thing left, the expand box aka arrow :D . It > > > > it > > > > > > also > > > > > > > possible change image when node is selected? Attached updated example > > > > and screenshot > > > > > > It uses itemlist.colorglyph (not published up to now). I can add > > > colorglyphactive but it does not help because you change > > > stockobjects.glyphs > > > from monochrome to rgb where glyph color has no meaning. > > > > Yes, I'm overriding stock glyphs with RGB fontawesome. Is there any other > > trick which don't need messup code on your side? > > No, I'll need to add imagelist properties to t*itemlist. Should be doable. > git master 266e2400313faabe0a88a3ff41542a0d904cb5b9 has versions in timagelist (experimental). Please do " procedure TIconManager.LoadFAIcons; [...] for i24:=Low(ICONS_24) to High(ICONS_24) do _Add(ICONS_24[i24].I, cl_default, 0, 0, ICONS_24[i24].S); stockobjects.glyphs.versioncount:= 2; stockobjects.glyphs.bitmaps[1].init(cl_white); " and set frmViewTree1:ttreeitemedit1.itemlist.boxglyph_versionactive to 1. Martin -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
On Sunday 16 April 2017 02:21:23 Krzysztof wrote: > Ah and another question. What if some node doesn't have image and should > not have any selected image neither? Is it safe to set: > > constructor TDataNode.create(const aowner: tcustomitemlist; > const aparent: ttreelistitem); > begin > inherited create(aowner, aparent); > > imagenr := imagelist.count * (-1); > FId := -1; > FFilename := ''; > end; Or " imagenr:= -bigint " Martin -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
Ah and another question. What if some node doesn't have image and should not have any selected image neither? Is it safe to set: constructor TDataNode.create(const aowner: tcustomitemlist; const aparent: ttreelistitem); begin inherited create(aowner, aparent); imagenr := imagelist.count * (-1); FId := -1; FFilename := ''; end; -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
2017-04-14 13:55 GMT+02:00 Martin Schreiber: > On Friday 14 April 2017 12:43:01 Krzysztof wrote: > > Thanks a lot! Only one thing left, the expand box aka arrow :D . It it > also > > possible change image when node is selected? Attached updated example and > > screenshot > > It uses itemlist.colorglyph (not published up to now). I can add > colorglyphactive but it does not help because you change > stockobjects.glyphs > from monochrome to rgb where glyph color has no meaning. Yes, I'm overriding stock glyphs with RGB fontawesome. Is there any other trick which don't need messup code on your side? -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
On Thursday 13 April 2017 06:35:04 Martin Schreiber wrote: > On Wednesday 12 April 2017 19:47:12 Krzysztof wrote: > > Great, seems doable but can't understand ttreeitemedit1.itemlist.imnr_X > > policy. Can you explain that too? > > The actual image number is the sum of the node image number and the state > values either direct or the lookup value provided by TImageList.ImageLookup > if it is not empty. > Assume an empty ImageLookup property, ItemList.imnr_selected = 1, -> the > image number of a not selected node is the value in TListItem.imagenr, for > a selected node it is TListItem.imagenr + 1. > Maybe there also should be imnr_active and imnr_focused for you. > Done, git master bedb32e46c5eff2f9c5db55bf32d7d2712767e47. Martin -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
On Thursday 13 April 2017 13:14:06 Krzysztof wrote: > 2017-04-13 6:35 GMT+02:00 Martin Schreiber: > > The actual image number is the sum of the node image number and the state > > values either direct or the lookup value provided by > > TImageList.ImageLookup if it is not empty. > > Assume an empty ImageLookup property, ItemList.imnr_selected = 1, -> the > > image > > number of a not selected node is the value in TListItem.imagenr, for a > > selected node it is TListItem.imagenr + 1 > > Weird, seems that it is TListItem.imagenr + 2. This is my sets of icons: > > type > TIco16 = ( > ico16_main, ico16_news, ico16_user, . > > FLibraryNode.imagenr := ord(ico16_main); > ttreeitemedit1.itemlist.insert(0,FLibraryNode); > > and selected: > ttreeitemedit1.itemlist.imnr_selected := 1; > > but when selecting node then I see icon ico16_user instead of ico16_news. > No other imnr_ are set. > Please send the testcase. Martin -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
On Wednesday 12 April 2017 19:47:12 Krzysztof wrote: > Great, seems doable but can't understand ttreeitemedit1.itemlist.imnr_X > policy. Can you explain that too? The actual image number is the sum of the node image number and the state values either direct or the lookup value provided by TImageList.ImageLookup if it is not empty. Assume an empty ImageLookup property, ItemList.imnr_selected = 1, -> the image number of a not selected node is the value in TListItem.imagenr, for a selected node it is TListItem.imagenr + 1. Maybe there also should be imnr_active and imnr_focused for you. Martin -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
Great, seems doable but can't understand ttreeitemedit1.itemlist.imnr_X policy. Can you explain that too? -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
On Tuesday 11 April 2017 21:45:03 Krzysztof wrote: > Can you explain this? Lets say that I have timagelist1 which contain images > for normal grid state, initialized with timagelist1.bitmap.init(cl_black) > or any other color and second timagelist2 which contain exactly same images > but for selected state and are initialized with > timagelist2.bitmap.init(cl_white) or any other color. Now, how to make them > work with grid (ttreeitemedit)? Is it possible to have only one timagelist > and init different color per image, not per whole timagelist? Because I > think that for IndexLookup I have to use only one timagelist. > Correct. > Note that I'm creating images at runtime with mseftglyphs and base color > cl_black. It depends on user which color scheme he choice (that is why > timagelist.bitmap.init() is called) > Instead to fill the whole imagelist pixmap you need to color the individual images. Example for two colors, every glyph has been added twice: " var co1,co2: colorty; i1: int32; bmp1: tmaskedbitmap; begin [...] setup co1 and co2 bmp1:= tmaskedbitmap.create(bmk_rgb); bmp1.options:= [bmo_masked,bmo_graymask]; with timagelist1 do begin bmp1.size:= size; for i1:= 0 to count - 1 do begin getimage(i1,bmp1); if odd(i1) then begin bmp1.init(co2); end else begin bmp1.init(co1); end; setimage(i1,bmp1); end; end; bmp1.destroy(); end; " Martin -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
2017-04-10 13:36 GMT+02:00 Martin Schreiber: > > > 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. > Can you explain this? Lets say that I have timagelist1 which contain images for normal grid state, initialized with timagelist1.bitmap.init(cl_black) or any other color and second timagelist2 which contain exactly same images but for selected state and are initialized with timagelist2.bitmap.init(cl_white) or any other color. Now, how to make them work with grid (ttreeitemedit)? Is it possible to have only one timagelist and init different color per image, not per whole timagelist? Because I think that for IndexLookup I have to use only one timagelist. Note that I'm creating images at runtime with mseftglyphs and base color cl_black. It depends on user which color scheme he choice (that is why timagelist.bitmap.init() is called) P.S. It is really cosmetic think, so don't bother with that. I'm just curious :) -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
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 OnAfterPaint. Martin -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
[MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid
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? 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. This is only cosmetic, don't bother if this is too much work. Regards -- 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk