云联天下首页 |  登陆 |  注册 |  密码找回 |  关于我们 | 加入收藏 
首页技术资料PHP编程→GtkLabel 【字号: 】 【背景色 杏仁黄 秋叶褐 胭脂红 芥末绿 天蓝 雪青 灰 银河白(默认色)

GtkLabel

网址来源:http://www.kehui.net发布时间: 2002-01-21 18:12:12
GtkObject<br> `-- GtkWidget<br> `-- GtkMisc<br> `-- GtkLabel<br>Object Properties and Methods



Constructor



构造器



Object GtkLabel (char labelstring);



Constructs a GtkLabel.



构造一个标签



Methods



void set_text (char labeltext);



-- Writes text to the label.



向标签写文本



void set_justify (int justify);



-- Justify method.



对齐方式



void set_pattern (char pattern);



-- Underline method.



设置下划线



void set_line_wrap (bool linewrap);



-- Linewrap toggle switch.



切换行回绕



char get()



-- Method for harvesting current text content of label.



void parse_uline (char text_to_be_parsed);



-- Accelerator key definition method.



定义方法的快捷键



Properties<br>None - Not Directly Accessible.



Signals<br>None - Not Directly Accessible.



Detailed Description



GtkLabel is a widget for displaying a small amount of text. If you need to display a great deal of text, use GtkText instead.



用于显示少量文字的部件,如果量很大,用 GtkText 部件代替



Labels do not emit signals. If you want to catch signals (e.g. from a button click) you will need to put it in a GtkEventBox.



标签不能带信号,如果你想携带信号(如按钮点击),你需要把它放到 GtkEvenBox 里面



Methods



void set_text (char labeltext);



set_text is not needed when first creating a label; this method is only useful for replacing the text of the label later, eg. to report a server connection status or to reflect user input.



设置标签在创建的时候是不必要的。这个方法用来在以后更改标签的文本用的。用于报告服务器连接状态或反映用户输入。



$label->set_text("Whatever you wish to pass");<br>     <br>This could also be passed as a reference to a string, e.g. <br>$label->set_text($pass_stuff);



void set_justify (int justify);



This is the method for justifying text in GtkLabel. The options are pre-set enum flags, giving the choices of:



设置 标签的对齐方式,参数是预设的枚举标志



GTK_JUSTIFY_LEFT, <br>GTK_JUSTIFY_RIGHT, <br>GTK_JUSTIFY_CENTER, <br>GTK_JUSTIFY_FILL.



$label->set_justify(GTK_JUSTIFY_LEFT);



void set_pattern (char pattern);



This is the method for underlining text in GtkLabel. It needs to be defined as a pattern, eg if your text consists of "Apple Banana Carrot", then "__  __" will underline Apple and Carrot but not Banana, as that is where the space falls.



用于标签的下划线。需要定义一个规范,如果你的标签为 "Apple Banana Carrot", 那么 "__  __"将给前后2个做下划线



$label->set_pattern("__  __");



void set_line_wrap (bool linewrap);



Boolean switch between linewrap on and linewrap off, with TRUE being linewrap on.



设置行回绕状态



$label->set_line_wrap(TRUE);



char get()



Returns the current text content of the label.



返回当前的标签文本



$label->get();



void parse_uline (char text_to_be_parsed);



This method checks the text for underscores, and then underlines the character following the underscore. It will take the last underlined character in a label and return it as a lower-case accelerator key, e.g. "_Save" will return the accelerator key value for "s".



检查下划线状态,返回下划线下一个字母的小写作为快捷键。



$label->parse_uline("_File");



Properties<br>None - Not Directly Accessible.



Signals<br>None - Not Directly Accessible.

kehui 

相关新闻
v 什么是容器? 2002-01-21 18:12:12
v GtkWidget 2002-01-21 18:12:12
v 相关的站点有什么? 2002-01-21 18:12:12
v 如何在 win32 下面安装 PHP_GTK? 2002-01-21 18:12:12
v 如何在 GtkFileSelection 里面使用按钮? 2002-01-21 18:12:12
v 我能在 win32 下使用主题吗? 2002-01-21 18:12:12
v 什么是 PHP-GTK? 2002-01-21 18:12:12
v 如何知道支持哪个 GTK 类?? 2002-01-21 18:12:12
v swf_enddoaction 2002-01-21 18:12:12
v swf_shapelinesolid 2002-01-21 18:12:12
  最新新闻
智慧家居
智慧家居颠覆传统智能家居
智慧云谷让智能家居变成有智慧的
智慧云谷引领智慧家居新生活
科技改变生活 智慧云谷智慧家居系
智慧家居领航者,智慧云谷助你玩
智能家居如何赢得市场美誉度?
智慧云谷智慧家居:创业者有无限
WiFi智能家居你还在用?这样的智
互联网+助推智能家居产业
智慧云谷为您打造真正的智能家居
智能家居产业需要的不是单品,而
新家如何选择开关?智慧云谷iWis
智能传感器-世界首款“智”为你的
智慧云谷开关智能安防智能空气质
智能开关品牌,如何选择智能开关
秋季干燥,智慧家居温湿度传感器
传感器助力智慧家居 感知爱家
iWiscloud智能触摸开关缔造家居装

  最新帖子
 ※室内空气污染的危害及  [sensor]
 ※超声波风速传感器在生  [sensor]
 ※这么冷清  [gabc111]
 ※手机APP操作有问题  [ssy11407]
 ※智慧云谷智慧家居将在  [cici]
 ※上传下载  [cici]
 ※下载智慧家居  [apple2008]
 ※秋季干燥,智慧家居温  [apple2008]
 ※智慧家居紧扣热点 安全  [apple2008]
 ※办公大楼如何智慧化管  [apple2008]
 ※智慧云谷工业自控的优  [apple2008]
 ※传感器助力智慧家居 感  [apple2008]
 ※智能开关品牌,如何选  [apple2008]
 ※智慧云谷开关智能安防  [apple2008]
 ※没有专业人员,如何安  [apple2008]
 ※烟台智慧云谷董事长任  [apple2008]
 ※互联网+助推智能家居产  [apple2008]
 ※WiFi智能家居你还在用  [apple2008]
 ※智慧云谷智慧家居:创  [apple2008]
 ※智能家居如何赢得市场  [apple2008]
钯碳回收 硝酸银回收 银浆回收 银焊条回收 回收银浆 氯化钯回收 氯化钯回收 氧化钯回收 回收硝酸钯 钯水回收价格 海绵钯回收 钯炭回收价格 回收镀金板 深圳钯碳回收 镇江氯化钯回收 杭州钯浆回收 银浆回收多少钱 回收钯碳公司 硝酸银的价格 那里有回收金 氯化钯回收价格 江苏擦银布回收 硝酸银价格 德州钯粉回收 银铜回收 回收钯粉 回收铂碳催化剂 佛山钯碳回收 金盐回收价格 海绵钯回收 钯碳高价回收 钯回收价格 钯炭回收