Hi all, I recently put together a custom error dialog that would be used to include a helpful stack trace for when things go wrong. Having built it in XRCed and checked that everything looked as expected I fired up our application and loaded the dialog as normal[1]. However, when displaying the dialog in our application the usually transparent background area of the wxART_ERROR (which is created with a wxStaticBitmap in XRC) isn't transparent as it appeared in XRCed and is instead black (or presumably whatever the currently assigned background colour is). After some hunting around online I haven't been able to find anything useful, but was able to reproduce the error in code. It seems that using the following snippet causes the problem to occur:
my $bitmap = Wx::ArtProvider::GetBitmap ( wxART_ERROR ); my $sbitmap = new Wx::StaticBitmap ( $frame, -1, $bitmap ); Where as the following code snippet has the correct behaviour: my $bitmap = Wx::ArtProvider::GetIcon ( wxART_ERROR ); my $sbitmap = new Wx::StaticBitmap ( $frame, -1, $bitmap ); I'd rather not have to rewrite it all in code as it kind of defeats the point of using XRC in the first place :) If anybody has any suggestions then I'm all ears! Cheers, Matt [1] The code looks pretty much like this: use Wx::Perl::FSHandler::UNC; Wx::FileSystem::AddHandler( new Wx::Perl::FSHandler::UNC ); $xrc = Wx::XmlResource->new( wxXRC_USE_LOCALE ); $xrc->InitAllHandlers; $xrc->Load( read_file( DATA_XRC ) ); my $dialog = $xrc->LoadDialog( 'dlg_error' ); $dialog->ShowModal; -- Matt Wilson Software Engineer Multiplatform, Innovation and Development Studio BBC Vision Room 2507 White City, London W12 7TS +44 (0) 20 8752 4561 http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this.
