TBCanvas

From Jeremie Leroy - XOJO Controls Wiki
Revision as of 22:41, 6 May 2012 by Admin (Talk | contribs) (1 revision)

Jump to: navigation, search

This Custom Control based on a Canvas acts like REALBasic's toolbars.
5 layouts are integrated (Big Icons, Small Icons, with labels or not...).

Buttons can have a ContextualMenu and a HelpTag.
Text Separators can be displayed between buttons.


Events
Action
DisplayChanged
DrawBackground
HelpTagText
PaintMore
Refreshed


Properties
Bold enableScroll SelectedColor
Button ForceVertical TextFont
ButtonType InitialValue TextSize
DisplayType Italic Underline
DrawFrame minHeight
enableCustomize minWidth
enableDrag redrawTime



Methods
Append Insert
Count Push
CountVisible Redraw
CreateButton Remove
CreateTextSeparator Remove
GetButton
Insert


Shared Methods
Register


Class Constants

DisplayType

The following class constants can be used to specify the value of DisplayType property.

Class Constant Description
TypeBigIcons Big Icons with no caption
TypeBigIconsLabel Big Icons with caption (default)
TypeLabelsOnly Only the caption is displayed
TypeSmallIcons Small Icons with no caption
TypeSmallIconsLabel Small Icons with caption

History

Version 1.4

Released 19 March 2012

  • New:
    • Display types: TypeMediumIcon, TypeMediumIconLabel
      When medium icon is selected, it expects to have a 24x24 picture in the Button.Icon property. (Customer request)

Version 1.2

Released 15 December 2009

  • New:
    • Method: GetButton(theName As String)
      Lets you get a handle to a Button by using its name.
    • Method: Redraw() is now a public method. It used to be Protected.
    • Button "Name" property is now ReadOnly
    • Property: ForceVertical As Boolean
  • Fix:
    • Fixed and tested on REALBasic 2008r1 up to 2009r5


Version 1.1

Released 08 November 2009

  • New:
    • New constructor for Toolbar Button
    • For Button with menus, if the menuitem has a tag, then the tag is passed in the menu event. If not, the caption is passed.
  • Fix:
    • Fixed MenuItem display when a Button is hidden because of the width of the toolbar



Version 1.0

Released 01 May 2009


See Also

TBButton class; TBLanguage Module.