From: John L. <jla...@gm...> - 2005-08-01 03:56:07
|
On 7/29/05, The Doctor <the...@bl...> wrote: > That SetFocus() was the wrong one though. You added it to the dialog that= works, and I already said that SetFocus() wasn;t solving things, although = it appears as if it ought to... That dialog works anyway, somehow, because = of the preceding FilePane dialog I think, but I don't know why it makes a d= ifference unless it's something to do with returning focus to the rest of t= he program. If you add that SetFocus() after the other ShowModal instead, i= t won't stop that other dialog from failing to respond to any first click. = On the other hand, if this doesn't happen for you, it might be something OS= specific. It's certainly repeatable here with brutally simple regularity. = I can't do anything to shift it.. :) I guess I don't have the same problem, I took your sample code and added buttons to them as a further test. (note that the wxID_OK/CANCEL will automatically close the dialog and returns that window id from ShowModal) I find that when I press the toolbar tool the dialog pops up, the dialog has the focus (the titlebar is colored) and if I press enter (don't even click on the dialog) the dialog closes since it has focus and the enter key goes to the button which has the focus. BANK=3Dwx.wxDialog(PANEL,-1,"",wx.wxPoint(-1,-1),wx.wxSize(426,266)) CNFG=3Dwx.wxDialog(PANEL,-1,"",wx.wxPoint(-1,-1),wx.wxSize(426,266)) do wx.wxButton(BANK, wx.wxID_OK, "Ok") wx.wxButton(CNFG, wx.wxID_OK, "Ok") end I'm using XP, what are you using? > I was hoping you might say something more about that caveat emptor direct= ory idea. I think it's a good way to make a script available. This is all s= o new, that in the absence of any documentation other than the source files= , surely any kind of working script is worth preserving and distributing in= tact, so that others can learn from it. If it works, coding style is surely= secondary, and no-one's going to confuse it with the formally released sam= ples. Also, if this doesn't happen, it might be rather difficult to persuad= e anyone else to contribute... I think the perfect solution is to create a Wiki on the web page. I think SF provides the means and that way it'll be very easy for you and others to contibute and update/polish/add code or whatever since it'll be user editable and you'll have full control. For example see here, http://wiki.wxwidgets.org/wiki.pl?Table_Of_Contents I don't know how to set it up, but I know someone who does so I'll have ask about it. Regards, John Labenski |