'AliKet' via wx-users
2014-09-09 10:14:22 UTC
Hello,
Here is the full statement from the xrc sample:
[[[
VARIABLE EXPANSION ISN'T IMPLEMENTED CURRENTLY. You can use variable
expansion in your XRC files. The steps to do this are:
(1)Enclose a variable inside a dollarsign and round brackets, like this:
dollarsign(version).
(2) Set the XmlResource flags to allow expansion of variables.
(3)Before you use that XML resource, inform the XmlResourceHandler what you
want that variable's value to be, via
wxResourceHandler::Get()->SetVariable( "version", "2.4.0")
Now, at runtime, the variable will be automatically replace by its value
before the control is constructed.
The number in the version at the bottom of this dialog is an example of
this expansion in action.
This is very handy for things like replacing the text in a wxStaticText,
since it is a much simpler way to make a wxStaticText be a proper size: by
creating it the proper size. This is in contrast to the alternative way of
having using some static non-variable value in your XRC, having XRC
construct it, then your application having code to change the text of it,
then your app getting its best size, then setting the statictext's size,
then laying out the dialog's sizer again, and other work.
]]]
As noted above : VARIABLE EXPANSION ISN'T IMPLEMENTED CURRENTLY !! (
understood )
My question is : When this feature will be implemented ?
BTW: I can't find a class named wxResourceHandler ?
Here is the full statement from the xrc sample:
[[[
VARIABLE EXPANSION ISN'T IMPLEMENTED CURRENTLY. You can use variable
expansion in your XRC files. The steps to do this are:
(1)Enclose a variable inside a dollarsign and round brackets, like this:
dollarsign(version).
(2) Set the XmlResource flags to allow expansion of variables.
(3)Before you use that XML resource, inform the XmlResourceHandler what you
want that variable's value to be, via
wxResourceHandler::Get()->SetVariable( "version", "2.4.0")
Now, at runtime, the variable will be automatically replace by its value
before the control is constructed.
The number in the version at the bottom of this dialog is an example of
this expansion in action.
This is very handy for things like replacing the text in a wxStaticText,
since it is a much simpler way to make a wxStaticText be a proper size: by
creating it the proper size. This is in contrast to the alternative way of
having using some static non-variable value in your XRC, having XRC
construct it, then your application having code to change the text of it,
then your app getting its best size, then setting the statictext's size,
then laying out the dialog's sizer again, and other work.
]]]
As noted above : VARIABLE EXPANSION ISN'T IMPLEMENTED CURRENTLY !! (
understood )
My question is : When this feature will be implemented ?
BTW: I can't find a class named wxResourceHandler ?
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users