logo       


Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

XRC with built in art: msg#00002

Subject: XRC with built in art
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.
                                        
Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
db.firebase.por...    text.xml.xalan....    qnx.openqnx.dev...    user-groups.zar...    internationaliz...    kde.devel.konve...    finance.e-gold....    emacs.latex.pre...    gis.therion/200...    web.webmin.gene...    yellowdog.gener...    vserver/2003-08...    redhat.release....    sysutils.tivoli...    xfree86.expert/...    mail.becky.user...    hardware.netapp...    netbsd.ports.xe...    python.distutil...    boot-loaders.gr...    culture.interne...    java.springfram...    activedir/2006-...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe