nim_duilib(15)之duilib屬性列表.xml


Note

為了更加方便查看duilib的屬性(github有時候打不開),特此記錄。
閱讀本文,可以知道控件有哪些屬性,可以寫在xml文件中。個別需要結合源碼一起看
from here

原文

<?xml version="1.0" encoding="UTF-8"?>

<Resources>
	<Global comment="定義了全局公用資源,包含了字體、class、文字顏色。定義Global標簽的xml文件需要放到資源目錄的根位置,目前命名為硬編碼“global.xml”,詳見GlobalManager::Startup函數代碼">
		<Attribute name="disabledfontcolor" default="0xFFA7A6AA" type="DWORD" comment="默認的disabled字體顏色,如(0xFFA7A6AA)"/>
		<Attribute name="defaultfontcolor" default="0xFF000000" type="DWORD" comment="默認的字體顏色,如(0xFF000000)"/>
		<Attribute name="linkfontcolor" default="0xFF0000FF" type="DWORD" comment="默認的link字體顏色,如(0xFF0000FF)"/>
		<Attribute name="linkhoverfontcolor" default="0xFFD3215F" type="DWORD" comment="默認的linkhoverfont字體顏色,如(0xFFD3215F)"/>
		<Attribute name="selectedcolor" default="0xFFBAE4FF" type="DWORD" comment="默認的selected字體顏色,如(0xFFBAE4FF)"/>
	</Global>
	<Font comment="需要在Global標簽內定義">
		<Attribute name="name" default="" type="STRING" comment="字體名字,如果指定為system,則使用系統默認字體(在xp上為新宋體,高版本系統上為微軟雅黑)"/>
		<Attribute name="size" default="12" type="INT" comment="字體大小,如(13)"/>
		<Attribute name="bold" default="false" type="BOOL" comment="字體是否加粗,如(true)"/>
		<Attribute name="underline" default="false" type="BOOL" comment="字體是否加下划線,如(true)"/>
		<Attribute name="italic" default="false" type="BOOL" comment="字體是否為斜體,如(true)"/>
	</Font>
	<Class comment="需要在Global標簽或者Window標簽內定義">
		<Attribute name="Class" default="" type="STRING" comment="自定義的控件樣式的名字,在需要使用樣式的地方直接指定這個名字,如(btn_default)"/>
		<Attribute name="Value" default="" type="STRING" comment="內置的控件屬性,如(text=&quot;測試&quot; height=&quot;12&quot;)"/>
	</Class>
	<TextColor comment="用字符串常量代替數值來定義顏色,需要在Global標簽內定義">
		<Attribute name="name" default="" type="STRING" comment="顏色的名字,如(white)"/>
		<Attribute name="value" default="0x00000000" type="DWORD" comment="常量對應的顏色,如(0xFFFFFFFF)"/>
	</TextColor>
	<Language comment="實際並不存在此標簽,這里說明多語言的用法。語言文件文件需要放到“lang\zh_CN\gdstrings.ini”(相對可執行程序,並不是相對資源目錄),詳見GlobalManager::Startup函數代碼。語言定義的例子:“STRING_OK 			= 確 定”,其中STRING_OK是文本ID,確定是此ID代表的實際文本,需要設置多語言文本的地方直接指定文本ID即可,每行定義一個ID">
	</Language>
	<Include comment="用於xml文件的復用和較大xml文件的分割,指定此標簽的地方會在對應位置自動展開指定的xml文件,需要包含在根標簽內部,不能獨立於根標簽使用">
		<Attribute name="source" default="" type="STRING" comment="要插入的xml文件的路徑,如(list_item.xml)"/>
		<Attribute name="count" default="1" type="INT" comment="重復插入的數量"/>
	</Include>  
</Resources>

<Events>
	<Event comment="此需要包含在某個控件標簽內使用。當包含Event標簽的控件觸發接收的消息時會動態設置接受者控件的屬性,設置為applyattribute代表的值">
		<Attribute name="type" default="" type="STRING" comment="接收的消息類型,用空格分隔多個消息,如(killfocus,完整的消息類型見duilib庫Define.h文件)"/>
		<Attribute name="receiver" default="" type="STRING" comment="接受者控件的名字,用空格分隔多個名字,如(btn_test).如果名字以“./”或者“.\開頭”,則代表接受者控件是包含Event標簽的控件的子控件,否則代表整個窗體內的某個控件"/>
		<Attribute name="applyattribute" default="" type="STRING" comment="動態設置的屬性值,可以設置多個屬性"/>
	</Event>
	<BubbledEvent comment="此需要包含在某個控件標簽內使用。當包含BubbledEvent標簽的控件或者其子控件觸發接收的消息時會動態設置接受者控件的屬性,設置為applyattribute代表的值,此標簽只能用於容器控件">
		<Attribute name="type" default="" type="STRING" comment="接收的消息類型,用空格分隔多個消息,如(killfocus,完整的消息類型見duilib庫Define.h文件)"/>
		<Attribute name="receiver" default="" type="STRING" comment="接受者控件的名字,用空格分隔多個名字,如(btn_test).如果名字以“./”或者“.\開頭”,則代表接受者控件是包含Event標簽的控件的子控件,否則代表整個窗體內的某個控件"/>
		<Attribute name="applyattribute" default="" type="STRING" comment="動態設置的屬性值,可以設置多個屬性"/>
	</BubbledEvent>
</Events>

<Controls>
	<Window parent="">
		<Attribute name="size" default="0,0" type="SIZE" comment="窗口的初始化大小,如(800,600)"/>
		<Attribute name="mininfo" default="0,0" type="SIZE" comment="窗口最小大小,如(320,240)"/>
		<Attribute name="maxinfo" default="0,0" type="SIZE" comment="窗口最大大小,如(1600,1200)"/>
		<Attribute name="heightpercent" default="0.0" type="DOUBLE" comment="窗口的初始高度占屏幕高度的百分比,應該寫在size、mininfo、maxinfo屬性后面"/>
		<Attribute name="sizebox" default="0,0,0,0" type="RECT" comment="窗口可拖動改變窗口大小的邊距,如(4,4,6,6)"/>
		<Attribute name="caption" default="0,0,0,0" type="RECT" comment="窗口可拖動的標題欄大小的邊距,最后一個參數是指離上邊框的距離,如(0,0,0,28)"/>
		<Attribute name="textid" default="" type="STRING" comment="窗體標題字符串的ID,ID在多語言文件中指定,如(STRID_MIANWINDOW_TITLE)"/>
		<Attribute name="roundcorner" default="0,0" type="SIZE" comment="窗口圓角大小,如(4,4)"/>
		<Attribute name="shadowattached" default="true" type="BOOL" comment="窗口是否附加陰影效果,如(true)"/>
		<Attribute name="shadowimage" default="" type="STRING" comment="使用自定義的陰影素材去代替默認的陰影效果,設置的路徑要注意相對路徑以及九宮格屬性,如(file='../public/bk/bk_shadow.png' corner='30,30,30,30')"/>
		<Attribute name="shadowcorner" default="0,0,0,0" type="RECT" comment="設置了shadowimage屬性后,設置此屬性來指定陰影素材的九宮格描述,這個屬性一定要寫在size屬性前面"/>	
		<Attribute name="alphafixcorner" default="14,14,14,14" type="RECT" comment="透明通道修補范圍的的九宮格描述"/>
		<Attribute name="custom_shadow" default="14,14,14,14" type="RECT" comment="與alphafixcorner完全一樣,為了兼容老版本xml所以沒有去掉這個屬性"/>
	</Window>
	<Control parent="" notifies="暫時不寫">
		<Attribute name="class" default="" type="STRING" comment="控件樣式,用樣式里面的屬性值來設置本控件的屬性,如(btn_default),可以同時指定多個樣式,各個樣式之間用空格分隔,需要寫在第一個屬性位置,"/>
		<Attribute name="name" default="" type="STRING" comment="控件名字,同一窗口內必須唯一,如(testbtn)"/>
		<Attribute name="halign" default="left" type="STRING" comment="控件的橫向位置,如(center),支持left、center、right三種位置"/>
		<Attribute name="valign" default="top" type="STRING" comment="控件的縱向位置,如(center),支持top、center、bottom三種位置"/>
		<Attribute name="margin" default="0,0,0,0" type="RECT" comment="外邊距,如(2,2,2,2)"/>
		<Attribute name="bkcolor" default="" type="STRING" comment="背景顏色字符串常量,如(white)"/>
		<Attribute name="bkcolor1" default="" type="STRING" comment="背景漸變色1,和bkcolor配合使用,如(blue)"/>
		<Attribute name="normalcolor" default="" type="STRING" comment="普通狀態顏色,如(white)"/>
		<Attribute name="hotcolor" default="" type="STRING" comment="懸浮狀態顏色,如(white)"/>
		<Attribute name="pushedcolor" default="" type="STRING" comment="按下狀態顏色,如(white)"/>
		<Attribute name="disabledcolor" default="" type="STRING" comment="禁用狀態顏色,如(white)"/>
		<Attribute name="bordercolor" default="" type="STRING" comment="邊框顏色,如(blue)"/>
		<Attribute name="bordersize" default="0" type="INT | RECT" comment="可以設置INT或RECT類型的值。當值為ING時則左、上、右、下都用該值作為寬。值為RECT類型時則分別設置左、上、右、下的邊框"/>
		<Attribute name="leftbordersize" default="0" type="INT" comment="左邊邊框大小,如(1),設置該值大於0,則將忽略bordersize屬性的設置"/>
		<Attribute name="topbordersize" default="0" type="INT" comment="頂部邊框大小,如(1),設置該值大於0,則將忽略bordersize屬性的設置"/>
		<Attribute name="rightbordersize" default="0" type="INT" comment="右邊邊框大小,如(1),設置該值大於0,則將忽略bordersize屬性的設置"/>
		<Attribute name="bottombordersize" default="0" type="INT" comment="底部邊框大小,如(1),設置該值大於0,則將忽略bordersize屬性的設置"/>
		<Attribute name="borderround" default="0,0" type="SIZE" comment="邊框圓角半徑,如(2,2)"/>
		<Attribute name="width" default="stretch" type="INT | STRING" comment="可以設置INT或STRING類型的值.當值為INT是則設置控件的最小寬度,如(100);當值為STRING時,stretch代表由父容器計算控件寬度,auto代表根據內容情況自動計算寬度"/>
		<Attribute name="height" default="stretch" type="INT | STRING" comment="可以設置INT或STRING類型的值.當值為INT是則設置控件的最小高度,如(100);當值為STRING時,stretch代表由父容器計算控件高度,auto代表根據內容情況自動計算高度"/>
		<Attribute name="minwidth" default="-1" type="INT" comment="控件的最小寬度,如(30)"/>
		<Attribute name="minheight" default="-1" type="INT" comment="控件的最小高度,如(30)"/>
		<Attribute name="maxwidth" default="9999999" type="INT | STRING" comment="控件的最大寬度,描述同width"/>
		<Attribute name="maxheight" default="9999999" type="INT | STRING" comment="控件的最大高度,描述同height"/>
		<Attribute name="bkimage" default="" type="STRING" comment="背景圖片,如(bk.bmp或file='aaa.jpg' res='' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' fade='255' xtiled='false' ytiled='false')"/>

		<Attribute name="tooltiptext" default="" type="STRING" comment="鼠標懸浮提示,如(請在這里輸入你的密碼)"/>
		<Attribute name="tooltiptextid" default="" type="STRING" comment="鼠標懸浮提示,指定多語言模塊的ID,當tooltiptext為空時則顯示此屬性,如(TOOL_TIP_ID)"/>
		<Attribute name="dataid" default="" type="STRING" comment="自定義字符串數據,輔助函數,供用戶使用"/>
		<Attribute name="enabled" default="true" type="BOOL" comment="是否可以響應用戶操作,如(true)"/>
		<Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以響應鼠標操作,如(true)"/>
		<Attribute name="keyboard" default="true" type="BOOL" comment="非CButtonUI類忽略該值,為false時不支持TAB_STOP,且該對象不處理鍵盤信息"/>
		<Attribute name="visible" default="true" type="BOOL" comment="是否可見,如(true)"/>
		<Attribute name="fadevisible" default="true" type="BOOL" comment="是否可見,如(true),此屬性會觸發控件動畫效果"/>
		<Attribute name="float" default="false" type="BOOL" comment="是否使用絕對定位,如(true)"/>
		<Attribute name="menu" default="false" type="BOOL" comment="是否需要右鍵菜單,如(true)"/>
		<Attribute name="nofocus" default="false" type="BOOL" comment="是否可以獲取焦點,如(true)"/>
		<Attribute name="alpha" default="255" type="INT" comment="控件的整體透明度,如(128)"/>
		<Attribute name="state" default="normal" type="STRING" comment="控件的當前狀態,支持normal、hot、pushed、disabled狀態"/>
		<Attribute name="cursortype" default="arrow" type="STRING" comment="鼠標移動到控件上時的鼠標光標,arrow、hand、ibeam"/>
		<Attribute name="normalimage" default="" type="STRING" comment="普通狀態圖片"/>
		<Attribute name="hotimage" default="" type="STRING" comment="鼠標懸浮的狀態圖片"/>
		<Attribute name="pushedimage" default="" type="STRING" comment="鼠標按下的狀態圖片"/>
		<Attribute name="disabledimage" default="" type="STRING" comment="禁用的狀態圖片"/>
		<Attribute name="forenormalimage" default="" type="STRING" comment="普通狀態前景圖片"/>
		<Attribute name="forehotimage" default="" type="STRING" comment="鼠標懸浮的狀態前景圖片"/>
		<Attribute name="forepushedimage" default="" type="STRING" comment="鼠標按下的狀態前景圖片"/>
		<Attribute name="foredisabledimage" default="" type="STRING" comment="禁用的狀態前景圖片"/>
		<Attribute name="renderoffset" default="0,0" type="SIZE" comment="控件繪制時的偏移量,如(10,10),一般用於繪制動畫"/>
		<Attribute name="fadealpha" default="false" type="BOOL" comment="是否啟用控件透明漸變動畫,如(true)"/>
		<Attribute name="fadehot" default="false" type="BOOL" comment="是否啟用控件懸浮狀態下 的透明漸變動畫,如(true)"/>
		<Attribute name="fadewidth" default="false" type="BOOL" comment="是否啟用控件寬度漸變動畫,如(true)"/>
		<Attribute name="fadeheight" default="false" type="BOOL" comment="是否啟用控件高度漸變動畫,如(true)"/>
		<Attribute name="fadeinoutxfromleft" default="false" type="BOOL" comment="是否啟用控件從左到右的動畫,如(true)"/>
		<Attribute name="fadeinoutxfromright" default="false" type="BOOL" comment="是否啟用控件從右到左的動畫,如(true)"/>
		<Attribute name="fadeinoutyfromtop" default="false" type="BOOL" comment="是否啟用控件從上到下的動畫,如(true)"/>
		<Attribute name="fadeinoutyfrombottom" default="false" type="BOOL" comment="是否啟用控件從下到上的動畫,如(true)"/>
	</Control>
	
	<Label parent="Control" notifies="暫時不寫" >
		<Attribute name="width" default="auto" type="INT | STRING" comment="可以設置INT或STRING類型的值.當值為INT是則設置控件的最小寬度,如(100);當值為STRING時,stretch代表由父容器計算控件寬度,auto代表根據內容情況自動計算寬度"/>
		<Attribute name="height" default="auto" type="INT | STRING" comment="可以設置INT或STRING類型的值.當值為INT是則設置控件的最小高度,如(100);當值為STRING時,stretch代表由父容器計算控件高度,auto代表根據內容情況自動計算高度"/>
		<Attribute name="text" default="" type="STRING" comment="顯示文本,如(測試文本)"/>
		<Attribute name="textid" default="" type="STRING" comment="多語言功能的ID,如(TEXT_OUT)"/>
		<Attribute name="align" default="left" type="STRING" comment="文本的輸出位置,如(center),支持left、center、right、top、vcenter、bottom"/>
		<Attribute name="font" default="-1" type="INT" comment="字體id,如(0)"/>
		<Attribute name="endellipsis" default="false" type="BOOL" comment="句末顯示不完是否使用...代替,如(true)"/>	
		<Attribute name="textpadding" default="0,0,0,0" type="RECT" comment="文字顯示的邊距,如(2,2,2,2)"/>
		<Attribute name="normaltextcolor" default="" type="STRING" comment="普通字體顏色,不指定則使用默認顏色,如(blue)"/>
		<Attribute name="hottextcolor" default="" type="STRING" comment="鼠標懸浮字體顏色,不指定則使用默認顏色,如(blue)"/>
		<Attribute name="pushedtextcolor" default="" type="STRING" comment="鼠標按下字體顏色,不指定則使用默認顏色,如(blue)"/>
		<Attribute name="disabledtextcolor" default="" type="STRING" comment="disabled字體顏色,不指定則使用默認顏色,如(blue)"/>
		<Attribute name="linelimit" default="false" type="BOOL" comment="是否限制正行輸出,如(true)"/>
		<Attribute name="singleline" default="true" type="BOOL" comment="是否單行輸出文字,如(true)"/>
	</Label>
	<LabelBox parent="Box" notifies="暫時不寫" comment="屬性同Label">
	</LabelBox>

	<Button parent="Label" notifies="暫時不寫" comment="屬性同Label">
	</Button>
	<ButtonBox parent="LabelBox" notifies="暫時不寫" comment="屬性同Label">
	</ButtonBox>

	<CheckBox parent="Button" notifies="暫時不寫" >
		<Attribute name="selected" default="false" type="BOOL" comment="是否選中"/>
		<Attribute name="selectednormalimage" default="" type="STRING" comment="選中的普通狀態圖片"/>
		<Attribute name="selectedhotimage" default="" type="STRING" comment="選中的鼠標懸浮的狀態圖片"/>
		<Attribute name="selectedpushedimage" default="" type="STRING" comment="選中的鼠標按下的狀態圖片"/>
		<Attribute name="selecteddisabledimage" default="" type="STRING" comment="選中的禁用的狀態圖片"/>
		<Attribute name="selectedtextcolor" default="" type="STRING" comment="選中狀態字體顏色,不指定則使用默認顏色,如(blue)"/>
		<Attribute name="selectednormalcolor" default="" type="STRING" comment="選中的普通狀態字體顏色,不指定則使用默認顏色,如(blue)"/>
		<Attribute name="selectedhotcolor" default="" type="STRING" comment="選中的鼠標懸浮狀態字體顏色,不指定則使用默認顏色,如(blue)"/>
		<Attribute name="selectedpushedcolor" default="" type="STRING" comment="選中的鼠標按下狀態字體顏色,不指定則使用默認顏色,如(blue)"/>
		<Attribute name="selecteddisabledcolor" default="" type="STRING" comment="選中的禁用狀態字體顏色,不指定則使用默認顏色,如(blue)"/>
		<Attribute name="selectedforenormalimage" default="" type="STRING" comment="選中的前景圖片"/>
		<Attribute name="selectedforehotimage" default="" type="STRING" comment="選中的鼠標懸浮狀態的圖片"/>
		<Attribute name="selectedforepushedimage" default="" type="STRING" comment="選中的鼠標按下狀態的前景圖片"/>
		<Attribute name="selectedforedisabledimage" default="" type="STRING" comment="選中的禁用狀態的前景圖片"/>	
	</CheckBox>
	<CheckBoxBox parent="ButtonBox" notifies="暫時不寫" comment="屬性同CheckBox" >
	</CheckBoxBox>

	<Option parent="CheckBox" notifies="暫時不寫"  >
		<Attribute name="group" default="" type="STRING" comment="所屬組的名稱"/>
	</Option>
	<OptionBox parent="CheckBox" notifies="暫時不寫" comment="屬性同Option" >
	</OptionBox>

	<Progress parent="Label" notifies="暫時不寫" >
		<Attribute name="hor" default="true" type="BOOL" comment="水平或垂直,如(true)"/>
		<Attribute name="min" default="0" type="INT" comment="進度最小值,如(0)"/>
		<Attribute name="max" default="100" type="INT" comment="進度最大值,如(100)"/>
		<Attribute name="value" default="0" type="INT" comment="進度值,如(50)"/>
		<Attribute name="isstretchfore" default="TRUE" type="BOOL" comment="指定進度條前景圖片是否縮放顯示"/>
		<Attribute name="progresscolor" default="" type="STRING" comment="進度條前景顏色,不指定則使用默認顏色,如(blue)"/>
		<Attribute name="progressimage" default="" type="STRING" comment="進度條前景圖片"/>
	</Progress>

	<Slider parent="Progress" notifies="暫時不寫" >
		<Attribute name="thumbnormalimage" default="" type="STRING" comment="拖動滑塊普通狀態圖片"/>
		<Attribute name="thumbhotimage" default="" type="STRING" comment="拖動滑塊鼠標懸浮狀態圖片"/>
		<Attribute name="thumbpushedimage" default="" type="STRING" comment="拖動滑塊鼠標按下狀態圖片"/>
		<Attribute name="thumbdisabledimage" default="" type="STRING" comment="拖動滑塊鼠標禁用狀態圖片"/>
		<Attribute name="thumbsize" default="10,10" type="SIZE" comment="拖動滑塊大小,如(10,10)"/>
		<Attribute name="step" default="1" type="INT" comment="進度步長,如(1)"/>
		<Attribute name="progressbarpadding" default="0,0,0,0" type="RECT" comment="滑動條繪制時縮小的內邊距"/>
	</Slider>

	<ScrollBar parent="Control" notifies="暫時不寫">
		<Attribute name="button1normalimage" default="" type="STRING" comment="左或上按鈕普通狀態圖片"/>
		<Attribute name="button1hotimage" default="" type="STRING" comment="左或上按鈕鼠標懸浮狀態圖片"/>
		<Attribute name="button1pushedimage" default="" type="STRING" comment="左或上按鈕鼠標按下狀態圖片"/>
		<Attribute name="button1disabledimage" default="" type="STRING" comment="左或上按鈕禁用狀態圖片"/>
		<Attribute name="button2normalimage" default="" type="STRING" comment="右或下按鈕普通狀態圖片"/>
		<Attribute name="button2hotimage" default="" type="STRING" comment="右或下按鈕鼠標懸浮狀態圖片"/>
		<Attribute name="button2pushedimage" default="" type="STRING" comment="右或下按鈕鼠標按下狀態圖片"/>
		<Attribute name="button2disabledimage" default="" type="STRING" comment="右或下按鈕禁用狀態圖片"/>
		<Attribute name="thumbnormalimage" default="" type="STRING" comment="滑塊普通狀態圖片"/>
		<Attribute name="thumbhotimage" default="" type="STRING" comment="滑塊鼠標懸浮狀態圖片"/>
		<Attribute name="thumbpushedimage" default="" type="STRING" comment="滑塊鼠標按下狀態圖片"/>
		<Attribute name="thumbdisabledimage" default="" type="STRING" comment="滑塊禁用狀態圖片"/>
		<Attribute name="railnormalimage" default="" type="STRING" comment="滑塊中間標識普通狀態圖片"/>
		<Attribute name="railhotimage" default="" type="STRING" comment="滑塊中間標識鼠標懸浮狀態圖片"/>
		<Attribute name="railpushedimage" default="" type="STRING" comment="滑塊中間標識鼠標按下狀態圖片"/>
		<Attribute name="raildisabledimage" default="" type="STRING" comment="滑塊中間標識禁用狀態圖片"/>
		<Attribute name="bknormalimage" default="" type="STRING" comment="背景普通狀態圖片"/>
		<Attribute name="bkhotimage" default="" type="STRING" comment="背景鼠標懸浮狀態圖片"/>
		<Attribute name="bkpushedimage" default="" type="STRING" comment="背景鼠標按下狀態圖片"/>
		<Attribute name="bkdisabledimage" default="" type="STRING" comment="背景禁用狀態圖片"/>
		<Attribute name="hor" default="false" type="BOOL" comment="水平或垂直,如(true)"/>
		<Attribute name="linesize" default="8" type="INT" comment="滾動一行的大小,如(8)"/>
		<Attribute name="thumbminlength" default="30" type="INT" comment="滑塊的最小長度"/>
		<Attribute name="range" default="100" type="INT" comment="滾動范圍,如(100)"/>
		<Attribute name="value" default="0" type="INT" comment="滾動位置,如(0)"/>
		<Attribute name="showbutton1" default="true" type="BOOL" comment="是否顯示左或上按鈕,如(true)"/>
		<Attribute name="showbutton2" default="true" type="BOOL" comment="是否顯示右或下按鈕,如(true)"/>
		<Attribute name="autohidescroll" default="true" type="BOOL" comment="是否自動隱藏滾動條,如(true)"/>
	</ScrollBar>

	<Box parent="Control" notifies="暫時不寫">
		<Attribute name="padding" default="0,0,0,0" type="RECT" comment="內邊距,如(2,2,2,2)"/>
		<Attribute name="childmargin" default="0" type="INT" comment="子控件之間的額外距離,如(4)"/>
		<Attribute name="mousechild" default="true" type="BOOL" comment="本控件的子控件是否可以響應用戶操作,如(true)"/>
	</Box>

	<VBox parent="Box" notifies="暫時不寫" comment="屬性同Box" >
	</VBox>

	<HBox parent="Box" notifies="暫時不寫" comment="屬性同Box" >
	</HBox>

	<ChildBox parent="Box" notifies="暫時不寫" >
		<Attribute name="xmlfile" default="" type="STRING" comment="要嵌入的xml文件的地址,如(childxml.xml)"/>
	</ChildBox>

	<TabBox parent="Box" notifies="暫時不寫" >
		<Attribute name="fadeswitch" default="false" type="BOOL" comment="當切換頁面時是否使用動畫效果,如(false)"/>
		<Attribute name="selectedid" default="0" type="INT" comment="默認選中的頁面id,如(0)"/>
	</TabBox>

	<TileBox>
		<Attribute name="columns" default="1" type="INT" comment="列數,如(4)"/>
		<Attribute name="itemsize" default="0,0" type="SIZE" comment="子項固定大小,如(128,128)"/>
	</TileBox>

	<ScrollableBox parent="Box" notifies="暫時不寫">
		<Attribute name="vscrollbar" default="false" type="BOOL" comment="是否使用豎向滾動條,如(true)"/>
		<Attribute name="hscrollbar" default="false" type="BOOL" comment="是否使用橫向滾動條,如(true)"/>
		<Attribute name="vscrollbarstyle" default="" type="STRING" comment="設置本容器的縱向滾動條的樣式"/>
		<Attribute name="hscrollbarstyle" default="" type="STRING" comment="設置本容器的橫向滾動條的樣式"/>
		<Attribute name="scrollbarpadding" default="0,0,0,0" type="RECT" comment="滾動條的外邊距,可以讓滾動條不占滿容器,如(2,2,2,2)"/>
		<Attribute name="vscrollunit" default="30" type="INT" comment="容器的縱向滾動條滾動步長,0代表使用默認步長"/>
		<Attribute name="scrollbarfloat" default="true" type="BOOL" comment="容器的滾動條是否懸浮在子控件上面,如(true)"/>
		<Attribute name="defaultdisplayscrollbar" default="true" type="BOOL" comment="暫時無用,未開發"/>
		<Attribute name="holdend" default="false" type="BOOL" comment="是否一直保持顯示末尾位置,如(true)"/>
	</ScrollableBox>

	<ListContainerElement parent="OptionBox" notifies="暫時不寫" comment="屬性同OptionBox"  >
	</ListContainerElement>

	<Combo parent="Box" notifies="暫時不寫">
		<Attribute name="dropbox" default="" type="STRING" comment="設置彈出框的樣式,如(padding=&quot;1,1,1,1&quot;)"/>
		<Attribute name="dropboxsize" default="0,150" type="SIZE" comment="彈出框大小設置"/>
		<Attribute name="vscrollbar" default="false" type="BOOL" comment="是否使用豎向滾動條,如(true)"/>
	</Combo>	

	<ListBox parent="ScrollableBox" notifies="暫時不寫">
		<Attribute name="scrollselect" default="false" type="BOOL" comment="是否隨滾動改變選中項,如(false)"/>
	</ListBox>

	<HListBox parent="ScrollableBox" notifies="暫時不寫" comment="屬性同ListBox">
	</HListBox>

	<VListBox parent="ScrollableBox" notifies="暫時不寫" comment="屬性同ListBox">
	</VListBox>

	<TileListBox parent="ScrollableBox" notifies="暫時不寫" comment="屬性同ListBox">
	</TileListBox>


	<TreeNode parent="ListContainerElement" notifies="暫時不寫" comment="屬性同OptionBox">
	</TreeNode>

	<TreeView parent="ListBox" notifies="暫時不寫" >
		<Attribute name="indent" default="0" type="INT" comment="子控件的縮進,如(3)"/>
	</TreeView>

	<RichEdit parent="Box" notifies="setfocus killfocus timer menu return windowinit(root)">
		<Attribute name="vscrollbar" default="false" type="BOOL" comment="是否使用豎向滾動條,如(true)"/>
		<Attribute name="autovscroll" default="false" type="BOOL" comment="是否隨輸入豎向滾動,如(true)"/>
		<Attribute name="hscrollbar" default="false" type="BOOL" comment="是否使用橫向滾動條,如(true)"/>
		<Attribute name="autohscroll" default="false" type="BOOL" comment="是否隨輸入橫向滾動,如(true)"/>
		<Attribute name="wanttab" default="true" type="BOOL" comment="是否接受tab按鍵消息,如(true)"/>
		<Attribute name="wantreturnmsg" default="true" type="BOOL" comment="是否接受return按鍵消息,如(true)"/>
		<Attribute name="returnmsgwantctrl" default="true" type="BOOL" comment="是否接受ctrl+return按鍵消息,如(true)"/>
		<Attribute name="rich" default="true" type="BOOL" comment="是否使用富格式,如(true)"/>
		<Attribute name="multiline" default="true" type="BOOL" comment="是否使用多行,如(true)"/>
		<Attribute name="readonly" default="false" type="BOOL" comment="是否只讀,如(false)"/>
		<Attribute name="password" default="false" type="BOOL" comment="是否顯示密碼符,如(true)"/>
		<Attribute name="number" default="false" type="BOOL" comment="是否只允許輸入數字,如(false)"/>
		<Attribute name="align" default="left" type="STRING" comment="文字對齊方式,取值left、right、hcenter、top、vcenter、bottom,如(right)"/>
		<Attribute name="text" default="" type="STRING" comment="顯示文本,如(測試文本)"/>
		<Attribute name="font" default="-1" type="INT" comment="字體id,如(0)"/>
		<Attribute name="normaltextcolor" default="" type="STRING" comment="普通狀態文字顏色,不指定則使用默認顏色,如(blue)"/>
		<Attribute name="disabledtextcolor" default="" type="STRING" comment="禁用狀態文字顏色,不指定則使用默認顏色,如(blue)"/>
		<Attribute name="promptmode" default="false" type="BOOL" comment="是否顯示提示文字,如(true)"/>
		<Attribute name="prompttext" default="" type="STRING" comment="文本框內提示文字,當文本框text為空時顯示"/>
		<Attribute name="prompttextid" default="" type="STRING" comment="多語言功能的ID,如(TEXT_OUT)"/>
		<Attribute name="promptcolor" default="" type="STRING" comment="文本框內提示文字的顏色"/>
	</RichEdit>
</Controls>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM