Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Toolbar clears after ESC key [solved, it`s the bug in user code]
Re: Toolbar clears after ESC key [bug?] [message #12094 is a reply to message #12091] Wed, 10 October 2007 21:06 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1094
Registered: August 2007
Senior Contributor
Oops sorry, it was my fault. Embarassed
It seems that you are adding the items to the wrong place.
Since you use toolbar.Set() to add your items to the toolbar, You should add the items to the "bar." Not explicitly to the toolbar.
Since OnUpdateToolbar is a callback, the argument passed as "bar" is implicitly the toolbar itself. That's why your code doubles the items whenever it refreshes.

void MainWindow::OnUpdateToolbar(Bar &bar)
{

bar.Add(t_("*********"), DispRVPFImages::dailyReport,THISBACK(OnLockUnlock));
bar.GapRight();
bar.Add(t_("*********"), DispRVPFImages::unlock,THISBACK(OnLockUnlock));
bar.Separator();
bar.Add(t_("*********"), DispRVPFImages::report,THISBACK(OnLockUnlock));
bar.Add(t_("*********"), DispRVPFImages::archive,THISBACK(OnLockUnlock));
bar.Add(t_("*********"), DispRVPFImages::options,THISBACK(OnLockUnlock));

}

Now you should be able to use it as you intended.


[Updated on: Wed, 10 October 2007 21:22]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Previous Topic: ButtonOption has no disabled state? [solved w/ ::Disable()]
Next Topic: Having my HWND and eating it, too...
Goto Forum:
  


Current Time: Wed May 15 12:50:13 CEST 2024

Total time taken to generate the page: 0.01807 seconds