|
From: Joakim V. <jo...@ve...> - 2004-04-02 08:55:14
|
Yes, this seems very nice!
How would the Attach function work in this case?
It would be neat if we could attach an array of values.
/Joakim
Patrick Earl wrote:
>On Thursday 01 April 2004 00:42, Joakim Verona wrote:
>
>
>>The later aproach could maybe be achieved with 2 resources, one for
>>the dialog, and one used as a template for dynamic addition to the
>>parent dialog.
>>
>>
>
>That's a cool idea. I'm implementing something right now, I think it
>will work out well. I don't have time to finish it tonight, but I'll
>describe the basic idea.
>
>I've created a new class called jppResourcePanel. You construct it by
>passing it a name and it will load the named panel from one of the
>same files you did a jppResourceDialog::LoadResource() on.
>
>Once you have the panel, there's a method that's used to add it to an
>existing dialog, namely to a sizer within the dialog. It would work
>something like this, minus the pythonish for loop:
>
>jppResourceDialog dialog("myDialog", parentWin);
>for x in ["one", "two", "three"] {
> jppResoucePanel panel("myPanel");
> wxLabel *label = (wxLabel *) panel.FindWindowByName("myLabel");
> if(!label) cout << "You crazy!";
> label.SetText(x);
> dialog.AddToSizer("mySizer", panel);
>}
>
>I haven't though through the memory management yet, so that may be
>something like panel = new jppResourcePanel("myPanel"). In any case,
>it's nearly as simple. Does that look good? Are there improvements
>to be made?
>
>Okay, time for bed.
>
> Patrick
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: IBM Linux Tutorials
>Free Linux tutorial presented by Daniel Robbins, President and CEO of
>GenToo technologies. Learn everything from fundamentals to system
>administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
>_______________________________________________
>jazzplusplus-devel mailing list
>jaz...@li...
>https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel
>
>
|