關於部分基本控制項的使用

2022-05-10 02:04:30 字數 1737 閱讀 7570

android: id= 」 @id/id值」                             //設定id值

android: text=」**」                                       //定義顯示文字

android: layout_width="wrap_content"      //元件寬度為文字寬度

android: layout_height="wrap_content"      //元件寬度為文字高度

textview(文字顯示框)

android: maxlength=」6」                              //允許最大字元數

android: textcolor=」#0ff00」                        //文字顏色

android: textsize=」50px」                             //文字大小

android: textstyle=」bold」                             //文字樣式

android: password=」true」                            //是否以密文方式顯示

android: layout_margin=」10px」                    //外邊距

android: backgroud=」@drawable/名稱」     //背景

gettext().tostring()//獲得控制項的文字內容

settext()                                          //設定控制項的文字內容

button (按鈕)

edittext(編輯框)

android: password=」」                  //是否以密文方式顯示

android: numeric=」integer」             //只能輸入數字

android: hint=」**」                         //水印

android: enabled=」false」                //設定是否可用,false不能用

radiobutton(單選按鈕)

嵌入到radiogroup中實現單選效果

android: checkedbutton=」radio的id值 」;

int getcheckedradiobuttonid( );           //獲得被選中的單選按鈕的id

checkbox(核取方塊)

android: checked=」true」;               //設定預設選中

checkbox(context context)             //例項化checkbox元件

void setchecked(boolean checked)      //設定預設選中

imageview()

android: maxheight=」 」;                //定義的最大高度

android: maxwidth=」 」;                 //定義的最大寬度

android: src=」 」;                           //定義顯示的id

imagebutton(按鈕)

關於TCHART控制項 Delphi 部分Code

procedure ttfchart.timer1timer sender tobject var amount double begin self.caption 現在的溫度是 floattostr roundto main.valuet,2 攝氏度 with chart1 do begin wi...

MFC部分控制項簡單使用

一.list control列表控制項 隸屬於clistctrl類 1.clistctrl 風格 lvs icon 為每個item顯示大圖示 lvs smallicon 為每個item顯示小圖示 lvs list 顯示一列帶有小圖示的item lvs report 顯示item詳細資料 直觀的理解 ...

VC CStatic控制項的基本使用

cstatic 繼承於 cwnd,是一種特殊的窗體。他可以顯示文字字串 這也是最常用的用法 圖示 指標 cursor 點陣圖和增強 元件.通常靜態控制項不提供輸入和輸出。但是如果把他的屬性設定為 ss notify,他可以通知其父視窗的擊滑鼠事件。一 cstatic 用於顯示文字 如果文字不變,可以...