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 » cannot open menu by key?
icon1.gif  cannot open menu by key? [message #13953] Sun, 03 February 2008 08:29 Go to next message
bonami is currently offline  bonami
Messages: 186
Registered: June 2007
Location: Beijing
Experienced Member
class Bonjour : public WithBonjourLayout<TopWindow> {
...
MenuBar menu;
...};

void Bonjour::Menu(Bar& bar)
{
menu.Add("File", THISBACK(FileMenu));
/* This is the top level menu. i cannot open File menu by Alt+F, though the menu name shows an underlined F.
if i implement this using bool HotKey(dword), i still cannot activate all menus by Alt, which is Window's windows' behavior */
menu.GapRight();
menu.Add("Help", THISBACK(HelpMenu));
}
Re: cannot open menu by key? [message #13954 is a reply to message #13953] Sun, 03 February 2008 10:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
bonami wrote on Sun, 03 February 2008 02:29

class Bonjour : public WithBonjourLayout<TopWindow> {
...
MenuBar menu;
...};

void Bonjour::Menu(Bar& bar)
{
menu.Add("File", THISBACK(FileMenu));
/* This is the top level menu. i cannot open File menu by Alt+F, though the menu name shows an underlined F.
if i implement this using bool HotKey(dword), i still cannot activate all menus by Alt, which is Window's windows' behavior */
menu.GapRight();
menu.Add("Help", THISBACK(HelpMenu));
}



Do you overload "HotKey"? If yes, do you call TopWindow::HotKey at the end?

If either is not true, send a testcase, can be anything...

(FYI, just tested with UWord, it works -> prolem likely is not with U++....)

Mirek
Re: cannot open menu by key? [message #13968 is a reply to message #13954] Mon, 04 February 2008 02:32 Go to previous messageGo to next message
bonami is currently offline  bonami
Messages: 186
Registered: June 2007
Location: Beijing
Experienced Member
i do overload Hotkey()
now i run TopWindow::HotKey at my hotkey()'s end and it works.

but i don't understand. TopWindow does not have any HotKey(). Ctrl's Hotkey() is invoked?
"If some child Ctrl returns true, method returns true, otherwise it returns false."
how does my return value work?
thank you.
Re: cannot open menu by key? [message #13973 is a reply to message #13968] Mon, 04 February 2008 10:58 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
bonami wrote on Sun, 03 February 2008 20:32

i do overload Hotkey()
now i run TopWindow::HotKey at my hotkey()'s end and it works.

but i don't understand. TopWindow does not have any HotKey(). Ctrl's Hotkey() is invoked?
"If some child Ctrl returns true, method returns true, otherwise it returns false."
how does my return value work?
thank you.


HotKey top->down propagation is performed by Ctrl::HotKey. I guess documentation is lacking here....

Mirek
Previous Topic: What does ScrollBar::SetPage do?
Next Topic: Scrolling in tabs
Goto Forum:
  


Current Time: Fri Apr 19 04:33:30 CEST 2024

Total time taken to generate the page: 0.04027 seconds