OnClick - the event of a mouse click on the ruler, including any of its buttons. There is a synonym for this event, OnTBClick;
RightClick - this property can be interrogated in the OnClick event handler in order to distinguish between right-clicking and left-clicking;
CurIndex - can be used to clarify which button was pressed in the handler of the general event OnClick or OnDropDown - for the entire ruler. If the click happened "past" all the buttons on the ruler itself, then the CurIndex property returns -1. The use of a common event saves some code size, since there is no need to draw up a separate procedure for processing each button, and when initializing the ruler, it is enough to assign only one event handler. But it is also possible to assign separate click handlers for each button on the ruler;
TBCurItem - similar to CurIndex, but returns a numeric handle, not the index of the pressed button;
Count - returns the number of buttons, similar to TBButtonCount (property synonym);
OnDropDown - This event is triggered when the user clicks on a button created as a "dropdown" with a '^' prefix in the text. What exactly will drop out in this case, and from what position on the screen, is entirely determined by your code;
IsButton - returns true for the ruler object (although, of course, it is not a button, but the return value is used for internal purposes, to support mnemonics, i.e. keystrokes from the keyboard using the shortcut Alt + <letter>);
SupportMnemonics - calling this method provides a code for the ruler that provides automatic triggering of buttons by pressing Alt + <letter> mnemonic key combinations, where letter is a character from the button text, preceded by the '&' prefix. This method can be called for the entire form to provide mnemonics for all window objects in the form (menus, buttons). Or, this method can be called on the Applet object to provide this functionality for all forms in the application in a single call;
TBAutoSizeButtons- if set (TRUE, this value is used by default - unless there is a TBBUTTONS_DFLT_NOAUTOSIZE symbol in the project options), then the size of the buttons is adjusted to the size of the text and icons individually. If the value is FALSE, all buttons are the same size.
|
Note that if this parameter is different from the default, then you should change it before creating the buttons. For example, initially set empty arrays buttons and imgindexes in the parameters of the NewToolbar constructor, then change this property for the created button bar, and only after that add buttons with the TBAddButtons functions. |
TBButtonsMinWidth - the minimum width of the buttons;
TBButtonsMaxWidth- the maximum width of the buttons. These two parameters must also be changed before buttons are added;
TBRows - allows you to set the number of lines that will be used to wrap buttons to the next line if the ruler is not wide enough.