[Fxruby-users] Re: Focus for FXDialogBox & Widgets
Status: Inactive
Brought to you by:
lyle
|
From: Lyle J. <ly...@kn...> - 2004-04-18 21:04:32
|
On Apr 17, 2004, at 10:59 PM, John Reed wrote:
> 1. If I put a line of code in my FXDialogBox initialize def =
that=20
> sets the focus to the first field, then my Ctrl-C menu command which=20=
> executes ID_CANCEL doesn=92t work without pressing the tab to go to =
the=20
> next field. Without the set focus on the 1st widget, the Ctrl-C works=20=
> fine. Is there something else that I need to do in my code?
I know that the text field widget (FXTextField) catches Ctrl+C (for=20
"Copy") and so it doesn't surprise me that it never executes the=20
ID_CANCEL for the focused text field (e.g. in the first case). I am=20
actually surprised that it *does* work when you tab to the next field,=20=
assuming that that widget is also a text field.
> 2. When a message box event gets fired from my FXDialogBox, =
the=20
> focus doesn=92t return to the FXDialogBox after I close the message =
box=20
> unless I click on it. Is there an event that I can fire that will=20
> automatically do this?
What happens if you do:
self.handle(self, MKUINT(0, SEL_FOCUS_SELF), null)
where here, "self" is a reference to the dialog box?
> Thanks for your help.
No problem, hope this helps.
Lyle
|