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 |
Oblivion
Messages: 1094 Registered: August 2007
|
Senior Contributor |
|
|
Oops sorry, it was my fault.
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.
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Wed, 10 October 2007 21:22] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed May 15 12:50:13 CEST 2024
Total time taken to generate the page: 0.01807 seconds
|