ok im making an image viewer right
right now it looks like this, structuraly
App
Frame
keyboard events
Panel
Image
i hit a keyboard shortcut, and a method under frame calls a method in
the Panel to change to the next picture. works.
now, id like to add a menu panel to the left (not like a file/edit...
menu) where i can change some settings.
so... do i...
1. stick the menu panel into the Frame together with the Panel and the kb-events
2. take everything currently under Frame and stick into a panel, then
under frame also add the new menu panel
(number two would look like)
App
Frame
Panel
keyboard events
Panel
Image
Panel
menu
i tried number two as i was thinking if i type something in the menu i
dont want the keypresses to accidentally be caught as commands, but
when i do it seems like my keypresses are completely ignored..
any ideas how i should structuret this?
cheers
···
--
■ ■ ■ ■ ■ ■ ■ ■ ■ ■
OK, so i went ahead and structured my image viewer like this:
App
keyevent
mPanel
menu
pPanel
picture
i set it so that when i hit tab it either Hide() or Show() my menu
panel, which works well
the shortcuts also work well on the image panel, changing images etc
BUT
as soon as i click on a text field or button in the menu, then the
shortcuts completely stops working for the picture. its like once ive
started typing in the text field it wont let go of the "focus" of the
kayboard event handler(?). Even if i hide the menu panel.
how can i get the widgets in the menu let go of the keyboard event
handling as i hide the menu panel?
cheers
Gustaf
···
2009/5/23 Gustaf Nilsson <gustaf@laserpanda.com>:
ok im making an image viewer right
right now it looks like this, structuraly
App
Frame
keyboard events
Panel
Image
i hit a keyboard shortcut, and a method under frame calls a method in
the Panel to change to the next picture. works.
now, id like to add a menu panel to the left (not like a file/edit...
menu) where i can change some settings.
so... do i...
1. stick the menu panel into the Frame together with the Panel and the kb-events
2. take everything currently under Frame and stick into a panel, then
under frame also add the new menu panel
(number two would look like)
App
Frame
Panel
keyboard events
Panel
Image
Panel
menu
i tried number two as i was thinking if i type something in the menu i
dont want the keypresses to accidentally be caught as commands, but
when i do it seems like my keypresses are completely ignored..
any ideas how i should structuret this?
cheers
--
■ ■ ■ ■ ■ ■ ■ ■ ■ ■
--
■ ■ ■ ■ ■ ■ ■ ■ ■ ■
Lol nevermind. worked it out
···
2009/5/24 Gustaf Nilsson <gustaf@laserpanda.com>:
OK, so i went ahead and structured my image viewer like this:
App
keyevent
mPanel
menu
pPanel
picture
i set it so that when i hit tab it either Hide() or Show() my menu
panel, which works well
the shortcuts also work well on the image panel, changing images etc
BUT
as soon as i click on a text field or button in the menu, then the
shortcuts completely stops working for the picture. its like once ive
started typing in the text field it wont let go of the "focus" of the
kayboard event handler(?). Even if i hide the menu panel.
how can i get the widgets in the menu let go of the keyboard event
handling as i hide the menu panel?
cheers
Gustaf
2009/5/23 Gustaf Nilsson <gustaf@laserpanda.com>:
ok im making an image viewer right
right now it looks like this, structuraly
App
Frame
keyboard events
Panel
Image
i hit a keyboard shortcut, and a method under frame calls a method in
the Panel to change to the next picture. works.
now, id like to add a menu panel to the left (not like a file/edit...
menu) where i can change some settings.
so... do i...
1. stick the menu panel into the Frame together with the Panel and the kb-events
2. take everything currently under Frame and stick into a panel, then
under frame also add the new menu panel
(number two would look like)
App
Frame
Panel
keyboard events
Panel
Image
Panel
menu
i tried number two as i was thinking if i type something in the menu i
dont want the keypresses to accidentally be caught as commands, but
when i do it seems like my keypresses are completely ignored..
any ideas how i should structuret this?
cheers
--
■ ■ ■ ■ ■ ■ ■ ■ ■ ■
--
■ ■ ■ ■ ■ ■ ■ ■ ■ ■
--
■ ■ ■ ■ ■ ■ ■ ■ ■ ■