Re: Help need with space bar

new topic     » goto parent     » topic index » view thread      » older message » newer message
Spock said...
jessedavis said...

1. Run above with interpreter
2. Up comes main window.
3. Press space bar. Nothing happens.
4. Click on find_win button.
5. Up comes find window.
6. Use FIND WINDOW close 'X' & close window.
7. Now, press space bar.
8. Up comes the find_win again.
9. Only does this after the find_win has been opened at least once.
10. Tried on another machine. Same result.
11. Tears of regret.

Any thoughts? Am I missing some default operation of the space bar? Windows maybe?

It seems to be a focus issue. Try adding this after the controls are created: setFocus(mw_find_btn)

Better still, add it to the main_win handler to fire when the parent window is first opened.

I wouldn't even consider this an issue. This is the expected behavior. The space bar activates the button like a click.

When the window first opens, the button does not have focus. Clicking the button sets focus to the button and then focus does not leave because there's nowhere else for it to go.

You can kill the focus manually but it seems that you have to show the window as a dialog. This probably has to do with the "find" window giving focus back to the "main" window when it's closed.

Do you not want the button to have focus? Or were you confused as to why the space bar triggered the button?

procedure mw_find_btn_onClick (integer self, integer event, sequence params) --THE FIND WINDOW BUTTON 
--openWindow(find_win,Normal) 
openDialog(find_win) 
w32Proc( xSetFocus, {NULL} ) 
end procedure 
setHandler( mw_find_btn, w32HClick, routine_id("mw_find_btn_onClick")) 

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu