On Mon, 21 Oct 2024 08:01:44 +0200 Pierre Couderc <pie...@couderc.eu> said:
> > On 10/19/24 11:22, Carsten Haitzler wrote: > > 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.) > > > > > Mmm, thank you, but there is a problem in my mind... > > 1- when I execute the elementary test on my computer (see debian > versions below) all elements of the grid have a check box and not only > the top right one. > > see https://www.tolsupport.fr/download/sss.jpg that's correct. the checkbox is in the top right of EACH ITEM in the gengrid. gengrid is a scrollable grid of items you can select. if they are different styles then this may vary but they are all the same style. > 2- why the text of the button is repeated in > > https://www.tolsupport.fr/download/ttt.jpg ? you have 2 buttons in each item - one overlayed on the other button. the smaller button is in the top-right of each item. > 3- what is the simplest way to make a grid of buttons of variable width > > Thank you what is your ultimate goal? maybe you want a table in a scroller then buttons in that table? how many buttons do you plan to eventually have? maybe you dont want buttons and want just gengrid items - treat them like buttons - when one is clicked... > PC > > > WARNING: apt does not have a stable CLI interface. Use with caution in > scripts. > > enlightenment/stable,now 0.25.4-2 amd64 [installed] > enlightenment-data/stable,stable,now 0.25.4-2 all [installed,automatic] > libecore-bin/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libecore-con1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libecore-drm2-1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libecore-evas1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libecore-fb1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libecore-file1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libecore-imf1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libecore-input1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libecore-ipc1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libecore-x1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libecore1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libector1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libedje-bin/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libedje1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libeet1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libeeze1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libefl-all-dev/stable,now 1.26.3-1+b1 amd64 [installed] > libefreet-bin/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libefreet1a/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libeina-bin/stable,now 1.26.3-1+b1 amd64 [installed] > libeina1a/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libeio1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libelementary-bin/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libelementary-data/stable,stable,now 1.26.3-1 all [installed,automatic] > libelementary1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libelput1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libembryo-bin/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libembryo1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libemile1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libemotion1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libeolian-bin/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libeolian1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libethumb-client-bin/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libethumb-client1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libethumb1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libevas-loaders/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libevas1/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libevas1-engines-drm/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libevas1-engines-fb/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libevas1-engines-wayland/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > libevas1-engines-x/stable,now 1.26.3-1+b1 amd64 [installed,automatic] > terminology/stable,now 1.13.0-1 amd64 [installed] > terminology-data/stable,stable,now 1.13.0-1 all [installed,automatic] > -- ------------- 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