togglebutton怎么读
英文原文:
toggle button
英式音标:
[ˈtɒg(ə)l] [ˈbʌt(ə)n]
美式音标:
[ˈtɑɡl] [ˈbʌtn]
commandbutton和togglebutton的区别是什么?
commandbutton和togglebutton的区别:
Command Button应用程序中使用户通过简单的敲击按钮来执行操作的一种工作方式,而toggleButton有两种状态。
commandbutton定义:
命令按钮是( Command Button)应用程序中使用户通过简单的敲击按钮来执行操作的一种工作方式。当用户选中按钮时,不仅会执行相应操作,还会使该按钮看上去象被按下并释放一样。无论何时,只要用户单击按钮,就会调用 Click 事件过程。
togglebutton定义:
toggleButton有两种状态:选中和未选择状态,并且需要为不同的状态设置不同的显示文本。
commandbutton和togglebutton的区别是什么?
表4-5 VBA里的ActiveX控件和Visual Basic 2005里对应的Windows Forms控件ActiveX控件(VBA)Windows Forms控件(Visual Basic 2005控件)TextBoxTextBoxLabelLabelComboBoxComboBoxListBoxListBoxCheckBoxCheckBoxOptionButtonRadioButtonToggleButton不适用(可以使用CheckBox控件,并把它的Appearance属性设为Button)CommandButtonButtonTabStripTabControlMultiPageTabControlScrollBarVScrollBar、HScrollBarSpinButtonNumericUpDownImageControl不适用(可以使用PictureBox控件代替)表4-6显示了表4-5里列出的许多控件都有的属性、方法和事件在名字上的改变。表4-6 Windows Forms控件常见成员的改变成员VBAVisual Basic 2005属性CaptionText属性ContainerParent属性HeightHeight、Size属性HWndHandle属性MouPointerCursor属性ParentFindForm方法属性PictureImage属性SelLengthSelectionLength属性SelStartSelectionStart属性SelTextSelectedText属性ToolTipTextToolTip组件属性WidthWidth、Size方法MoveSetBounds方法SetFocusFocus方法ZOrderBringToFront、SendToBack事件DblClickDoubleClick事件GotFocusEnter事件LostFocusLeave事件ValidateValidating除了属性、方法和事件的不同,每个控件特有的成员也有所不同。表4-7列出了这些不同之处。表4-7 比较ActiveX控件和Windows Forms控件之间的成员控件VBAVisual Basic 2005TextBoxAlignmentTextAlignTextBoxLockedReadOnlyTextBoxChangeTextChangedLabelAlignmentTextAlignLabelBackStyle把BackColor设为透明LabelWordWrap(自动)ComboBoxListItemsComboBoxListCountCountComboBoxListIndexSelectedIndexComboBoxLockedDropDownStyle = DropDownListComboBoxStyleDropdownStyleComboBoxAddItemAdd、AddRange、InrtComboBoxRemoveItemItems.RemoveComboBoxChangeTextChangedComboBoxClickSelectedIndexChangedListBoxColumnsMultiColumn、ColumnWidthListBoxListItemsListBoxListColumnCountListBoxListIndexSelectedIndexListBoxMultiSelectSelectionModeListBoxSelCountCountListBoxSelectedGetSelected、SetSelectedListBoxAddItemAdd、AddRange、InrtListBoxRemoveItemRemoveListBoxItemCheck不适用(仅对CheckedListBox适用)CheckBoxAlignmentCheckAlignCheckBoxStyleAppearanceCheckBoxValueCheckStateCheckBoxClickCheckStateChangedOptionButtonAlignmentTextAlignOptionButtonAppearanceFlatStyleOptionButtonValueCheckedOptionButtonClickCheckedChangedFrameAppearanceFlatStyle(GroupBox)FrameClickClick(Panel)CommandButtonCancel不适用(使用Form的CancelButton代替)CommandButtonDefault不适用(使用Form的AcceptButton代替)CommandButtonValue不适用ScrollBarMaxMaximumScrollBarMinMinimumScrollBarTabIndexTabIndexChangedScrollBarTabStopTabStopChangedScrollBarValueValueChanged
togglebutton设置状态vb
如果用户选择ToggleButton,则当前设置是Yes、True或On;如果用户没有选择ToggleButton,则设置为No、Fal或Off。
如果ToggleButton绑定到数据源,则更改设置将更改数据源的值。禁用的ToggleButton可以显示值,但它淡显而且不允许在用户界面上进行修改。
Android 的 ToggleButton样式问题?
进行android 自定义toggle Button按钮
很多人想做一个和iphone的,其实很简单 但是很多人问
主要是修改样式和图标就好了
<ToggleButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/toggle_me"/>
<lector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true"
android:drawable="@drawable/toggle_me_on" /> <!-- presd -->
<item android:drawable="@drawable/toggle_me_off" /> <!-- default/unchecked -->
</lector>
图片toggle_me_on 为
图片toggle_me_off 为
不需要再进行单击事件,只需要
toggleButton.tOnCheckedChangeListener(new OnCheckedChangeListener(){
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {
toggleButton.tChecked(isChecked);
imageView.tImageResource(isChecked?R.drawable.bulb_on:R.drawable.bulb_off);
}
});就行