@Davide Andreoli: Thanks this information was very usefull. I just have to put the evas_object_resize(win, 400, -1) just before the
evas_object_show(win); elm_run(); Now my code is working as expected. Cedlemo On 30/06/2014 17:52, Davide Andreoli wrote: > 2014-06-29 20:48 GMT+02:00 cedlemo <[email protected]>: > >> normal (no menu displayed) >> http://s28.postimg.org/ne60k5gul/ekana_normal.jpg >> >> with the menu problem: >> http://s4.postimg.org/jhj952df1/ekana_pb.png >> > I got this problem some time ago, the solution was just to swap the order > of some line of code...I cant remember well... try to move the show() > above, or look at menu examples and see the difference from your code. > > Sorry I cant remember the exact solution, sure it was just just the order > of the operations > > >> On 29/06/2014 19:08, Davide Andreoli wrote: >>> can you post a screenshot of your problem please? >>> >>> >>> 2014-06-28 11:29 GMT+02:00 cedlemo <[email protected]>: >>> >>>> I am writing a little application with elementary to learn kanas. I have >>>> a toolbar and I have >>>> a problem with the size of a menu of this toolbar. >>>> >>>> my main interface looks like this(which is very simple): >>>> window >>>> --> box (vertical) >>>> -->toolbar >>>> -->label >>>> -->entry >>>> -->button >>>> >>>> the size hint functions that I use are: >>>> window : >>>> evas_object_resize(win, 400, -1); >>>> elm_win_resize_object(add(win, box); >>>> my window have a min width of 400 and a min height that correspond >> to >>>> the needed height >>>> of the box >>>> box : >>>> elm_box_horizontal_set(box, EINA_FALSE) >>>> evas_object_size_hint_weight_set(box,EVAS_HINT_EXPAND,EVAS_HINT_EXPAND) >>>> toolbar: >>>> evas_object_size_hint_align_set(toolbar, EVAS_HINT_FILL, >> EVAS_HINT_FILL) >>>> elm_toolbar_menu_parent_set(toolbar, win) //this has not effect for >>>> my problem >>>> label: >>>> evas_object_size_hint_weight_set(kana_label,EVAS_HINT_EXPAND, >>>> EVAS_HINT_EXPAND); >>>> //this is the main widget that will be resized (height and width) >>>> when the main >>>> window is resized >>>> entry: >>>> evas_object_size_hint_weight_set(entry,EVAS_HINT_EXPAND, 0.0); >>>> button: >>>> evas_object_size_hint_weight_set(ui->bouton,EVAS_HINT_EXPAND, 0.0); >>>> >>>> I create the menu like this (like in the documentation from >>>> http://docs.enlightenment.org/auto/elementary/toolbar_example_03.html) >> : >>>> Elm_Object_Item * conf_menu = elm_toolbar_item_append(toolbar, NULL, >>>> "Configure", NULL, NULL); >>>> elm_toolbar_item_menu_set(conf_menu, EINA_TRUE); >>>> Evas_Object * menu = elm_toolbar_item_menu_get(conf_menu); >>>> >>>> and then I add menu items. My main interface works as expected. The >>>> problems that I can't solve concerns the menu. >>>> >>>> First the menu uses all the window size (I want it uses only the needded >>>> width/height based on the menu items). I have tried to use >>>> evas_object_size_hint_weight_set / >>>> evas_object_size_hint_align_set on the menu Evas_Object and the items >>>> but without effects. >>>> >>>> Then the menu doesn't have any background color. >>>> >>>> Any help will be appreciated >>>> >>>> >>>> Cedlemo >>>> >>>> >>>> >>>> >> ------------------------------------------------------------------------------ >>>> Open source business process management suite built on Java and Eclipse >>>> Turn processes into business applications with Bonita BPM Community >> Edition >>>> Quickly connect people, data, and systems into organized workflows >>>> Winner of BOSSIE, CODIE, OW2 and Gartner awards >>>> http://p.sf.net/sfu/Bonitasoft >>>> _______________________________________________ >>>> enlightenment-users mailing list >>>> [email protected] >>>> https://lists.sourceforge.net/lists/listinfo/enlightenment-users >>>> >> ------------------------------------------------------------------------------ >>> Open source business process management suite built on Java and Eclipse >>> Turn processes into business applications with Bonita BPM Community >> Edition >>> Quickly connect people, data, and systems into organized workflows >>> Winner of BOSSIE, CODIE, OW2 and Gartner awards >>> http://p.sf.net/sfu/Bonitasoft >>> _______________________________________________ >>> enlightenment-users mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/enlightenment-users >> >> >> ------------------------------------------------------------------------------ >> Open source business process management suite built on Java and Eclipse >> Turn processes into business applications with Bonita BPM Community Edition >> Quickly connect people, data, and systems into organized workflows >> Winner of BOSSIE, CODIE, OW2 and Gartner awards >> http://p.sf.net/sfu/Bonitasoft >> _______________________________________________ >> enlightenment-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/enlightenment-users >> > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > enlightenment-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-users ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ enlightenment-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-users
