⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 variable.xrc

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 XRC
字号:
<?xml version="1.0" encoding="ISO-8859-1"?><resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.3.0.1"><object class="wxDialog" name="variable_expansion_dialog">    <title>Variable Expansion Example</title>    <centered>1</centered>    <object class="wxFlexGridSizer">        <cols>1</cols>        <rows>0</rows>        <vgap>0</vgap>        <hgap>0</hgap>        <growablecols>0</growablecols>        <growablerows>0</growablerows>        <object class="sizeritem">            <flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxALL</flag>            <border>5</border>            <object class="wxTextCtrl" name="message_textctrl">                <size>500,150</size>                <style>wxTE_MULTILINE</style>                <value>VARIABLE EXPANSION ISN'T IMPLEMENTED CURRENTLY. You can use variable expansion in your XRC files. The steps to do this are:\n\n(1)Enclose a variable inside a dollarsign and round brackets, like this: dollarsign(version).\n\n(2) Set the XmlResource flags to allow expansion of variables.\n\n(3)Before you use that XML resource, inform the XmlResourceHandler what you want that variable's value to be, via wxResourceHandler::Get()-&gt;SetVariable( "version", "2.4.0")\n\n Now, at runtime, the variable will be automatically replace by its value before the control is constructed.\n\nThe number in the version at the bottom of this dialog is an example of this expansion in action.\n\nThis 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.</value>            </object>        </object>        <object class="sizeritem">            <flag>wxGROW|wxALIGN_BOTTOM</flag>            <object class="wxFlexGridSizer">                <cols>3</cols>                <rows>0</rows>                <vgap>0</vgap>                <hgap>0</hgap>                <growablecols>2</growablecols>                <growablerows>0</growablerows>                <object class="sizeritem">                    <flag>wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM</flag>                    <border>5</border>                    <object class="wxStaticText" name="build_information_statictext">                        <label>This build is:</label>                    </object>                </object>                <object class="sizeritem">                    <flag>wxALIGN_CENTRE|wxALL</flag>                    <border>5</border>                    <object class="wxStaticText" name="version_statictext">                        <label>$(version)</label>                    </object>                </object>                <object class="sizeritem">                    <flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL</flag>                    <border>5</border>                    <object class="wxButton" name="wxID_OK">                        <label>OK</label>                    </object>                </object>            </object>        </object>    </object></object></resource>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -