On Sat, 19 Oct 2024 10:30:04 +0200 Pierre Couderc via enlightenment-users
<enlightenment-users@lists.sourceforge.net> said:

> I need a grid of buttons, I have started from the gengrid example "Item 
> Custom Size"
> 
> with  a modified :
> 
> 
> Evas_Object *
> grid_content_get(void *data, Evas_Object *obj, const char *part)
> {
>     const Item_Data *id = data;
>          Evas_Object *bt = elm_button_add(obj);
>          elm_object_text_set(bt, "My button");
> //        evas_object_show(bt);
>          return bt;
> }
> 
> and is it not so bad but  my buttons are bit special : I get this :
> 
>   https://www.tolsupport.fr/download/ttt.jpg
> 
> What do I miss ?
> 
> I have the same  problem with sliders...
> 
> Thanks for help...


well that depends on the grid item style used... but it will have different
content parts per grid item... that's what the part string is for - it tells
you which part of the grid item it's asking content for. you return the same
button for everything... :) for example in elementary test the GenGrid test you
see an image ... but top-right is a checkbox... that's a different part. so the
content get func returns an image if its the main one and a checkbox widget if
its the top-right one :) themes can provide multiple item styles for genlist
and gengrid and they may have zero or more content areas with differing names
(each style should provide the same set of names for roughly the same purposes
but theme design can alter how they are placed etc.)


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler - ras...@rasterman.com



_______________________________________________
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users

Reply via email to