Additional attributes when using he subclass attribute in XRC files.

Renji renjipanicker at gmail.com
Mon Sep 4 01:45:38 PDT 2006


Replying to my own message:

Going thru the sources, I realized that I can do this using a
wxXmlResourceHandler-derived class.

One additional question:
The object created by the resource handler does not get auto-deleted by
any container. Is this how it's supposed to be?

Renji wrote:

> Hi all,
>
> BACKGROUND:
> I am trying to write an application that requires a window to have two
> background images, and various controls placed at specific positions on
> this window. So, I need to "stitch" two bitmaps together to form the
> composite background image, and one of these images can change at
> runtime depending on the application state.
>
> SO FAR:
> I am trying to implement a wxPanel-derived class (BitmapPanel) which
> will draw the background image and have other child controls placed on
> itself. Then I can have two or more instances of this class, which I
> can swap at runtime.
>
> QUESTIONS:
> 1. Is this the right approach, or is there a better way?
> 2. If this is correct, how do I specify the path to the background
> image in my XRC file, such that I can access it from within my subclass
> and load the image file?
> 
> Thanks in advance!
> -/renji







More information about the wx-users mailing list