Re: ItemFactory Question




On Mar 5, 2005, at 9:46 AM, ADIS - C.P.D. wrote:

How can I put a calendar inside a ItemFactoryEntry??

You're wanting to put a Gtk2::Calendar in a menu?

ObQuery:  What are you trying to do?


Although the signature says that gtk_menu_shell_insert() can take any old GtkWidget*, GtkMenuShell can only hold GtkMenuItems. gtk_menu_shell_insert() in fact asserts that the child you pass to it is a GtkMenuItem. Of course, a GtkCalendar is not a menu item, and GtkItemFactory uses gtk_menu_shell_insert() at a low level.

If you're trying to create a button that pops up a handy calendar to let you chose a date, you'll need to do more and different work; create and handle the popup window yourself. The cellrenderer-date.pl example shipped with the Gtk2 module (also available via viewcvs on our webpage) has a reasonably well-debugged example.

--
In some newer operating systems, time_t has been widened to 64 bits. In the negative direction, this goes back more than twenty times the age of the universe, and so suffices. In the positive direction, whether this range is sufficient to represent all possible times depends on the ultimate fate of the universe, but it can be expected to postpone overflow long enough for such implementation limits to be abolished.
  -- Wikipedia, on UNIX time.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]