The Qt documentation in C++ of this class can be read here: http://doc.trolltech.com/4.4/qtoolbutton.html
A control for the form object, provides a push button looking as tool button.
Please read the control class overview Control as well.
Property Checkable As Boolean (ReadWrite)
If it is true, the CommandButton appears as checkable button. If you would like to group several buttons as auto-exclusive group, set for all buttons the same group name.
Property Checked As Boolean (ReadWrite)
If it is true, the CommandButton is checked.
Property Icon As String (ReadWrite)
Either an icon or caption is visible on a CommandButton. If you set an icon, the caption will not be displayed. An icon can be an absolute path to an image file (png, jpg,…) like c:\myfolder\myimage.png or can be an relative path to the current project like myimage.png (which is present in the current project directory). Relative paths are recommended.
Might be a String containing binary data. See the binary project example for using.
Dim c As ToolButton c = Control("Button1") ' Button1 is declared as CommandButton in this form c.Icon = "tux.jpg" ' relative path. File exists in current project directory
Property Key As String (ReadWrite)
Holds the information, which key press would raise the event connected to this CommandButton, e.g. Ctrl+O. The strings “Ctrl”, “Shift”, “Alt” and “Meta” are recognized.
Shift+L Alt+U Alt+Shift+U Ctrl+Alt+C Copy
Default keys are
|HelpContents||Open help contents|
|WhatsThis||Activate whats this.|
|New||Create new Document.|
|Refresh||Refresh or reload current document.|
|AddTab||Add new tab.|
|NextChild||Navigate to next tab or child window.|
|PreviousChild||Navigate to previous tab or child window.|
|Find||Find in document.|
|FindNext||Find next result.|
|FindPrevious||Find previous result.|
|Replace||Find and replace.|
|SelectAll||Select all text.|
|MoveToNextChar||Move cursor to next character.|
|MoveToPreviousChar||Move cursor to previous character.|
|MoveToNextWord||Move cursor to next word.|
|MoveToPreviousWord||Move cursor to previous word.|
|MoveToNextLine||Move cursor to next line.|
|MoveToPreviousLine||Move cursor to previous line.|
|MoveToNextPage||Move cursor to next page.|
|MoveToPreviousPage||Move cursor to previous page.|
|MoveToStartOfLine||Move cursor to start of line.|
|MoveToEndOfLine||Move cursor to end of line.|
|MoveToStartOfBlock||Move cursor to start of a block. This shortcut is only used on OS X.|
|MoveToEndOfBlock||Move cursor to end of block. This shortcut is only used on the OS X.|
|MoveToStartOfDocument||Move cursor to start of document.|
|MoveToEndOfDocument||Move cursor to end of document.|
|SelectNextChar||Extend selection to next character.|
|SelectPreviousChar||Extend selection to previous character.|
|SelectNextWord||Extend selection to next word.|
|SelectPreviousWord||Extend selection to previous word.|
|SelectNextLine||Extend selection to next line.|
|SelectPreviousLine||Extend selection to previous line.|
|SelectNextPage||Extend selection to next page.|
|SelectPreviousPage||Extend selection to previous page.|
|SelectStartOfLine||Extend selection to start of line.|
|SelectEndOfLine||Extend selection to end of line.|
|SelectStartOfBlock||Extend selection to the start of a text block. This shortcut is only used on OS X.|
|SelectEndOfBlock||Extend selection to the end of a text block. This shortcut is only used on OS X.|
|SelectStartOfDocument||Extend selection to start of document.|
|SelectEndOfDocument||Extend selection to end of document.|
|DeleteStartOfWord||Delete the beginning of a word up to the cursor.|
|DeleteEndOfWord||Delete word from the end of the cursor.|
Property Caption As String (ReadWrite)
Holds the text to be displayed on the CommandButton.
Dim c As CommandButton c = FormControl("Button1") ' Button1 is declared as CommandButton in this form c.Caption = "Hello World!"
If you want the commandbutton to respond to key inputs, set the property Key. The character ”&” is used to underline the key the next character. Double ”&&” shows one ”&” in the caption.
See also Icon
Property Text As String (ReadWrite)
Same as Caption. Provided for easy-use.
Property Value As String (ReadWrite)
Same as Caption. Provided for easy-use.
Not implemented yet:
AutoRepeat ( bool ) AutoRepeatDelay ( int ) AutoRepeatInterval ( int )
This event is raised, whenever the user presses the ToolButton, either by mouse or key.
Sub Button1_OnEvent() Print "Button1 pressed" End Sub