Difference between revisions of "TBCanvas"

From Jeremie Leroy - XOJO Controls Wiki
Jump to: navigation, search
(Version 1.4)
Line 9: Line 9:
 
{| class=eventTable
 
{| class=eventTable
 
|-
 
|-
|class=titleClass colspan=2|Events
+
|class=titleClass colspan=1|Events
 
|-
 
|-
|width=50%|{{Event | name=Action | params=ButtonName As String | description= | newinversion=}}
+
|{{Event | name=Action | params=ButtonName As String | description= | newinversion=}}
|width=50%|{{Event | name=Open | description= | newinversion=}}
+
 
|-
 
|-
|width=50%|{{Event | name=DisplayChanged | params=minHeight As Integer | description= | newinversion=}}
+
|{{Event | name=DisplayChanged | params=minHeight As Integer | description= | newinversion=}}
|width=50%|{{Event | name=PaintMore | params=buttonIndex As Integer, g As Graphics, x As integer, y As integer, w As integer, h As integer | description= | newinversion=}}
+
 
|-
 
|-
|width=50%|{{Event | name=DrawBackground | params=g As Graphics | description= | returntype=Boolean | newinversion=}}
+
|{{Event | name=DrawBackground | params=g As Graphics | description= | returntype=Boolean | newinversion=}}
|width=50%|{{Event | name=Refreshed | description= | newinversion=}}
+
 
|-
 
|-
|width=50%|{{Event | name=HelpTagText | params=Text As String | description= | newinversion=}}
+
|{{Event | name=HelpTagText | params=Text As String | description= | newinversion=}}
 
+
|-
 +
|{{Event | name=PaintMore | params=buttonIndex As Integer, g As Graphics, x As integer, y As integer, w As integer, h As integer | description= | newinversion=}}
 +
|-
 +
|{{Event | name=Refreshed | description= | newinversion=}}
 
|-
 
|-
|width=50%|{{Event | name=MouseDown | params=X As Integer, Y As Integer | description= | returntype=Boolean | newinversion=}}
 
  
 
|-
 
|-
Line 134: Line 133:
  
 
*New:
 
*New:
**Display types: TypeMediumIcon, TypeMediumIconLabel.<br/> When medium icon is selected, it expects to have a 24x24 picture in the Button.Icon property.
+
**Display types: TypeMediumIcon, TypeMediumIconLabel<br/> When medium icon is selected, it expects to have a 24x24 picture in the Button.Icon property. (Customer request)
(Customer request)
+
  
 
===Version 1.2===
 
===Version 1.2===
Line 141: Line 139:
  
 
*New:
 
*New:
**Method: GetButton(theName As String)
+
**Method: GetButton(theName As String) <br/> Lets you get a handle to a [[TBCanvas.Button|Button]] by using its name.
Lets you get a handle to a [[TBCanvas.Button|Button]] by using its name.
+
 
**Method: Redraw() is now a public method. It used to be Protected.
 
**Method: Redraw() is now a public method. It used to be Protected.
 
**Button "Name" property is now ReadOnly
 
**Button "Name" property is now ReadOnly
Line 172: Line 169:
 
==See Also==
 
==See Also==
  
TBButton class; [[TBLanguage]] Module.
+
TBButton class; TBLanguage Module.

Revision as of 22:59, 6 May 2012

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.