Re: [MSEide-MSEgui-talk] Different font and image color selected row in twidgetgrid

2017-04-12 Thread Martin Schreiber
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


[MSEide-MSEgui-talk] Rounded-tabs of ttabwidget ?

2017-04-12 Thread Fred van Stappen
Hello.

Is it possible to have rounded-tabs of ttabwidget and if yes, how to do it ?

Thanks.

Fre;D


--
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] Rounded-tabs of ttabwidget ?

2017-04-12 Thread Fred van Stappen
> Yes, use TTabWidget.tab_frametab.frameimage_*.


Perfect.


 > Maybe "code dz" can provide an example?


Ho, yes and maybe it could be a good idea to fill MSE project with (much) more 
examples-demos.

Yes, I now, i do not forget it, I did promise to do a help-file for MSEide.


But I know also that nearly nobody will read it (yes, it is the real truth).

I have t confess too that for me, the best help is a demo with code not blabla 
that nobody read.



Fre;D

--
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-12 Thread Krzysztof
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

2017-04-12 Thread Martin Schreiber
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