Dave Hayes <d...@jetcafe.org> writes:

> 1) I wanted to switch the sense of ENTER and TAB in dialog box
> controls, so that ENTER moves between controls and TAB does something
> else I want it to do.
>
> So I've successfully remapped ENTER by adding the wxTE_PROCESS_ENTER
> flag to my Wx::TextCtrl, and used the EVT_TEXT_ENTER
> macro to create an event. So far so good. I can even call $event->Skip
> to tell other event handlers to process this key if I want.
>
> However, I can't seem to detect modifiers with this method since the
> passed in event is a wxCommandEvent not a wxKeyEvent. I'd need the
> GetModifiers() method to work, and it doesn't on wxCommandEvents.
>
> How can I detect whether shift is being held down in this particular case?

You may need to use EVT_CHAR on the TextCtrl from where you can inspect
anything.

> 2) I have added a help button to my dialogs. I'd like a separate help
> window to pop up with a close button, which is independent of the
> actual dialog window it's attached to.
>
> I'm real unclear as to how to do this.
>
> If I make the new help window a child of the dialog, and call Show()
> on it, the close button does not work. If I call ShowModal() then the
> help window blocks any action in the dialog.
>
> So if I then make the new help window childless (undef as the parent,
> as I understand) it seems to work in reverse. The close button in the
> dialog will not work until I close the dialog.

This is puzzling... Do you have example code that shows this behaviour?

-- Johan

Reply via email to