注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

chunwaihome 的博客

 
 
 

日志

 
 

Putting Controls in Buttons  

2010-03-16 10:29:19|  分类: PowerPro |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |


控件(control)是一類用於顯示數據,接受輸入和完成操作的圖形對像,一般放置在對話框或窗口中.

您可以在Powerpro的按鈕上插入"control"控件,而可顯示的控件包括

  1. Edit
  2. Combobox
  3. button
  4. checkbox
  5. progress bar
  6. slider

除了以上的控制外,您還可以將Windows COM Control控制顯示在按鈕上。在按鈕上加上控制的方法也很簡單,只要在名稱中輸入*control type keyword就可以了,Type就是上面控制的名稱,Keyword可以說是控制的參數。而控制的尺寸取決於按鈕的大小,而控制的背景色(backgrond)文字顏色(text colors)取決於按鈕的設定,Progress bar除外。

Putting Controls in Buttons - Y偉 - chunwaihome 的博客

下面就是各控件keyword的說明:

  • Edit

 

   Keyword

 說明

autohscroll  automatically scroll horizontally when end of edit box reached
autovscroll  automatically scroll horizontally when end of multi-line edit box reached
  hscrollbar    show horizontal scroll bar
 vscrollbar   show vertical scroll bar
 center   center text
 left     left- justify text
 lowercase  lower case of text
 multiline       multi-line text box
 nohidesel    don't hide selection when edit loses focus
 number    only allow numerics
 password    show entered characters as stars
 readonly     do not allow text entry
 right    upper case text
 clientedge     do not show boundary around control

 

  • Button

 Keyword  說明
 autotristate  the button is shown as an 3-state check box; returned values for cl.getctrlvalue are 0, 1, 2.
 autocheckbox  the button is shown as an 2-state check box; returned values for cl.getctrlvalue are 0, 1.
 pushlike  combine with autocheckbox to get a button that toggles pressed/up and returns values as a checkbox does
 bottom  text on bottom
 center  text centered
 multiline  multi-line text label
 rightbutton  text right justified
 top  text at top
 vcenter  vertically center text
 clientedge do show boundary around control


In addition, for checkboxes, you can put a number 0, 1, or 2 or an expression in parentheses anywhere among the keywords to set the initial state of the checkbox (0 is unchecked, 1 is checked, 2 is grayed).  Example to create a checkbox set initial to the Muted state with label "Mute":
*control button autocheckbox (muted) "Mute"

  • Comboxbox

The combobox requires that you select one of dropdownlist or dropdown keywords.  You may also have to set the button height to see the whole drop list; start with zero and experiment with other values if that does not work.
You can set the initial text in the combo drop down by including it within quotes.  Separate each entry with a vertical bar |.  For dropdown, the first entry goes into the edit box.  For example, "alpha|beta|gamma|delta" puts alpha in edit box, and has three dropdown items:  beta, gamma, delta.

 
  height  nnn ?set height with dropdown list showing to nnn pixels.  Default is 250.  Height without dropdown list showset based on font used.
 autohscroll  auto scroll text in edit
 dropdown  show the drop down; do not forget this if you want to see the icon and the drop down list of items
 dropdownlist  no edit box
 lowercase  lower case input text
 nointegralheight  show partial items in drop down
 sort  sort items in dropdown alphabetically
 uppercase  upper case input text
 clientedge  do not show boundary around control
 scroll   include vertical scroll on dropdown
 border  draw border around control
   
   
   

For example, the following creates a combo box with drop down and initial value "choose"; note that the initial value will not appear in the combo box drop down list.
*control combobox "choose|alpha|beta|gamma" dropdown

  • Slider

Before the keywords of the slider control, you can put one to four numbers or expressions in parentheses which give the initial setting,  the lower bound, the upper bound, and the tic frequency.  If the last number is omitted, no ticks are placed except for those at the end.

 Keyword

 說明

 vertical  vertical slider
 left  ticks on left
 right  ticks on right
 bottom  ticks on bottom
 top  ticks on top
 both  ticks on both sides
 noticks  no ticks at all; also removes ticks at end points
 clientedge   do not show boundary around control
   


For example, the following creates a slider with values 0 to 255, initial value set to volume, ticks every 20.
*control slider (volume) 0 255 20

 

  • Progress Bar

Before the keywords of the slider control, you can put one to three numbers or expressions in parentheses which give the initial setting,  the lower bound, and the upper bound.

 Keyword

 說明

 vertical         vertical progress bar


For example, the following creates a progress with values 0 to 1000, initial value set to 100.
 *control progress 100 0 1000.
You use the cl.setctrlvalue function to change the progress bar setting.

  • Auto Completion

You can use the following key words with edit controls or combo boxes (dropdown only) to add autocompletion to the file system or URLs.

autofile                                       autcomplete from file system
autourl                                       autocomplete from MRU or History URLsl
autourlhistory                            autcomplete from hstiry URLs only
autourlmru                                  autcomplete from MRU URLs only
autoappend_off                       force auto append off, regardless of registry setting
autoappend_on                          force auto append on, regardless of registry setting

autosuggest_off                        force auto suggest off, regardless of registry setting
autosuggest_on                          force auto suggest off, regardless of registry setting

 

  评论这张
 
阅读(620)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017