From: Mattia B. <mat...@li...> - 2005-03-13 07:36:16
|
On Fri, 11 Mar 2005 10:22:38 +0200 Mark Wardell <ma...@ne...> wrote: Hello, > I am trying to enhance the printing and previewing side of things ... > > I have a Wx::Dialog with report related options and buttons that launch a > Wx::PreviewFrame by means of a Preview button. With the PreviewFrame active > and I have clicked on the Print canvas to be sure, if I push Enter the > default button on the dialog (now hidden and behind the PreviewFrame) is > activated and another preview frame is created, if I press the Escape key > the wxID_CANCEL button is activated and the dialog closes leaving the > PreviewFrame on screen. Has anyone had any experience with this? > > Is there anyway to override the CreateControlBar or Initialize methods? If I > could do this then I could try and look at control focus issues regrading > above problem. I could also create my own ControlBar with improved features. Looking at the C++ code it might not be that simple (the code does not look very flexible). As far as I can see your problem comes from the EVT_CHAR handler of the wxPreviewCanvas. As a workaround you could try to: * call $previewframe->Initialize * use $previewframe->GetChildren and get the wxPreviewCanvas * add an empty EVT_CHAR handler Regards Mattia |