[gtkmm] i can delete toolbar ButtonElements...



Hello,
I m still working on my modular application and once more, i ve encountered a problem that i don t manage to solve. this time, it concerns the toolbar: in fact, in my menubar, i can select one module among several ones. this provoques (or it is mean to) the toolbar to change, to be in relation with the actual selected module. i ve managed to add buttons to the toolbar, it i ve read the gtkmm2.2 doc (i m not developping under gtkmm2.4) and didn t understand how to delete buttons. :-[ i suppose i have to use one of these methods:

virtual void Gtk::Toolbar_Helpers::ToolList::erase (iterator start, iterator stop)
iterator  Gtk::Toolbar_Helpers::ToolList::erase (iterator)
virtual void  Gtk::Toolbar_Helpers::ToolList::remove (Widget& widget)

i ve tried all of them: to get an iterator, i ve tried to use the two Gtk::Toolbar_Helpers::ToolList::find methods without any success. i ve tried the above remove method with a ButtonElem parameter (my toolbar contains nothing else that ButtonElems), but no more success...

i know my problem may seem stupid for you, but i m not very skilled in C++ and without any comments, the API is a bit obscur for me sometimes (like this time), especially for the templates! Thanks for your explainations! ;-)

cedric

ps: Matthew Walton, once (1 or 2 weeks ago ;-D ) you told me than there were a better way to delete several lines of a ListStore than the way i tried to use. i ve no other idea, so could you tell me how to do it in a "clean" way? my purpose is not to recopy some code, but to learn! ;-) thanks too!





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