Welcome
Contents of ctButton

 The ctButton object is a button control that is capable of supporting transparency.

The ctButton control is able to support transparency through both its own drawing methods, and through the OCX 96 specification guidelines. However, this does not mean that transparency will be supported in all languages. See Compatibility Issues for more details.

The ctButton control also contains some other features. These include ...

•	Offset properties that allow absolute control of the placement of the text and picture.

•	Ability to display the picture only.

•	Different images for up, down, mouse-over, and disabled buttons.

•	Multiple line text within the button.

•	Support for sound effects.???Support for transparent bitmaps as well as icons.

•	Different fonts, colors, and borders for the different button states.

The ctButton button can generate a click event from being clicked with the mouse, or by pressing the space or Enter key when the button has focus.

File Names

File Name	: CTBUTTON.OCX

License File 	: ctButton.lic

Class Name

CctButtonCtrl

See Also :

Compatibility Issues

Simulating a Transparent Effect

Events

Methods

Properties

ctButton © 2001 DBI Technologies Inc.


Events

ctButton Event	Occurs
Click	Standard Event
DblClick	Standard Event
KeyDown	Standard Event
KeyPress	Standard Event
KeyUp	Standard Event
MouseDown	Standard Event
MouseMove	Standard Event
MouseOn	Occurs when the mouse initially moves over the control.
MouseUp	Standard Event


Methods

ctButton Method	Return Type	Description
CheckStatus	void	Forces the button to determine its current status and re-paint itself if it's in the wrong state
ReDraw	void	Force the control to re-paint itself.


Properties

ctButton Property	Data Type	Description
BackColor	long	Specifies the background color of the control when the button is in an up state.
BackColorOver	long	Specifies the color used to paint the background when the control is not disabled but the mouse is moving over it.
BackImage	Picture	Specifies the image used to paint the background of the control.
BackStyle	integer (enumerated)	Specifies whether the background of the control will be transparent or opaque. Valid values include ... • 0 - Transparent • 1 - Opaque
BorderColor	long	Specifies the color used to paint a regular border around the control.
BorderDown	integer (enumerated)	Specifies the type of border to place around the control when it is in a down state. Valid values include ... • 0 - Regular • 1 - None • 2 - Raised • 3 - Lowered
BorderOver	integer (enumerated)	Specifies the type of border to place around the control when the mouse is moving over it. Valid values include ... • 0 - Regular • 1 - None • 2 - Raised • 3 - Lowered • 4 - Default
BorderType	integer (enumerated)	Specifies the type of border to place around the control. Valid values include ... • 0 - Regular • 1 – None • 2 - Raised • 3 - Lowered
Caption	string	Specifies the text to be displayed in the button.
DisableColor	long	Specifies the color used to paint the Caption when the control is disabled.
DownColor	long	Specifies the color used to paint the button when it is down or being clicked on.
DrawFocus	boolean	Specifies whether or not a focus border will be drawn around the caption when the control has focus.
EraseBkGnd	boolean	Specifies whether or not the background of the control will be erased before the button is drawn.
FocusBackColor	long	Specifies the color used to paint the background of the button when it has focus.
FocusForeColor	long	Specifies the color used to paint the text of the button when it has focus.
Font	Font	Specifies the font used for the text within the control when the mouse is not over it.
FontOver	Font	Specifies the font used for the text within the control when the mouse is over it.
ForeColor	long	Specifies the color used to paint the caption when the control is not disabled and the mouse is not moving over it.
ForeColorOver	long	Specifies the color used to paint the caption when the control is not disabled but the mouse is moving over it.
ImageXOffset	short	Specifies the horizontal offset used to calculate the starting position of the BackImage property.
ImageYOffset	short	Specifies the vertical offset used to calculate the starting position of the BackImage property.
LineColorDark	long	Specifies the color used to paint dark side of a raised border.
LineColorLight	long	Specifies the color used to paint light side of a raised border.
MaskBitmap	boolean	Specifies whether to make bitmap pictures transparent or not.
MaskColor	long	Specifies the color used for transparency when using a transparent bitmap picture.
MouseIcon	Picture	Specifies the custom image used for the cursor when the mouse moves over the control.
MousePointer	integer (enumerated)	Specifies the mouse pointer to be used when the mouse is passing over the control.
MultiLine	integer (enumerated)	Specifies the multi-line status and alignment of the text on the button. Valid values include ... • 0 - None • 1 - Left • 2 - Right • 3 - Center
OffsetPicture	boolean	Specifies whether or not the image in the button will be offset when the button is in a down state.
ParentHwnd	long	Specifies the handle of the parent window of the control.
PicOnly	boolean	Specifies whether or not only the picture (no text) will be displayed in the button.
PicPosition	integer (enumerated)	Specifies the position of the bitmap in relation to the caption. Valid values are ... • 0 - None • 1 - Top • 2 - Bottom • 3 - Left • 4 - Right • 5 - Center
Picture	Picture	Specifies the main image to be displayed in the button.
PictureDisabled	Picture	Specifies the image to be displayed in the button when the button is disabled.
PictureDown	Picture	Specifies the image to be displayed in the button when the button is being pressed (or down).
PictureOver	Picture	Specifies the image to be displayed in the button when the mouse is moving over it.
PicXOffset	short	Specifies the horizontal offset value used to calculate the position of a picture on the button.
PicYOffset	short	Specifies the vertical offset value used to calculate the position of a picture on the button.
RectBottom	long	Specifies the bottom coordinate of the control in relation to the parent window.
RectLeft	long	Specifies the left coordinate of the control in relation to the parent window.
RectRight	long	Specifies the right coordinate of the control in relation to the parent window.
RectTop	long	Specifies the top coordinate of the control in relation to the parent window.
SoundClick	string	Specifies the name of a wave (.wav) file to be played when the button is clicked on.
SoundOver	string	Specifies the name of a wave (.wav) file to be played when the mouse first starts to move over the button.
State	boolean	Specifies whether the button is in an up (true) or down (false) state.
TextAlign	integer (enumerated)	Specifies the horizontal alignment of the text within the button. Valid values include ... • 0 - Left • 1 - Right • 2 - Center
TextXOffset	short	Specifies the horizontal offset value used to calculate the position of the text in the button.
TextYOffset	short	Specifies the vertical offset value used to calculate the position of the text in the button.
Toggle	boolean	Specifies whether the button will toggle when it is pressed.


Compatibility Issues

The ctButton control is able to support transparency through both its own drawing methods, and by supporting the "Windowless Control" option from the OCX 96 specification guidelines. However, this does not mean that transparency will work in all languages. In some languages, the OCX container (or wrapper) will be implemented in such a way that transparency will not be possible. The control may still be transparent, but the container is not.

The drawing methods used for transparency in languages such as Visual Basic 4 force the parent form to redraw itself in the same area as the button when the button is drawing itself. This may cause problems if the palette used by the parent form is not the same as the palette being used by control. It is possible that not all colors will come through in a proper manner. As well, the control only tells the parent form to redraw itself, not other controls. In other words, if you place an item such as an image control behind a button, the button may no longer draw its background properly. This problem does not exist in languages that support the "Windowless Control" option such as Visual Basic 5.

Because the ctButton control supports the "Windowless Control" option, it will not contain a valid window handle under languages that support that option (i.e. Visual Basic 5 or 6). This may cause problems if you need to use the buttons handle as part of your program. Also, windowless controls may not be able to obtain certain other information such as their position on the screen. This may cause problems when the windows background that hosts ctButton needs to be re-drawn. If this is the case, the properties RectBottom, RectLeft, RectRight, RectTop, and ParentHwnd can be used to compensate. You may need to add the following code for each button somewhere in the application.

ctButton1.RectTop = (ctButton1.Top / Screen.TwipsPerPixelY)

ctButton1.RectLeft = (ctButton1.Left / Screen.TwipsPerPixelX)

ctButton1.RectBottom = ((ctButton1.Top + ctButton1.Height) / Screen.TwipsPerPixelY)

ctButton1.RectRight = ((ctButton1.Left + ctButton1.Width) / Screen.TwipsPerPixelX)

ctButton1.ParentHwnd = Fowm1.hWnd


Simulating a Transparent Effect

While this control does support transparency, not all host languages support transparency with ActiveX controls. For those instances, this control contains the necessary properties required to simulate transparency. True transparency occurs when an image behind the control remains visible even though a control sits on top of it.

In this case, we are assuming that we are using an image assigned to a form and that we want this image to become part of the background of the control. To do this, we assign the same image as that assigned to the form to the BackImage property of the control. You then adjust the ImageXOffset and ImageYOffset properties so that image in the control lines up with the image assigned to host form. This can either be done at design time or at run time. For instance..

    Private Sub Form_Load()

        ctButton.BackImage = Form1.Picture

        ctButton.ImageXOffset = ctButton.Left / Screen.TwipsPerPixelX

        ctButton.ImageYOffset = ctButton.Top / Screen.TwipsPerPixelY

    End Sub


BackColor
BackColor Property

Description

Specifies the background color of the control when the button is in an up state. This property will have no effect if the BackStyle property is set to a value of 0 (Transparent).

Syntax

[form.]ctButton.BackColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctButton.BackColor = RGB( 128, 128, 128 )


BackColorOver
BackColorOver Property

Description

Specifies the color used to paint the background when the control is not disabled but the mouse is moving over it.

Syntax

[form.]ctButton.BackColorOver [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctButton.BackColorOver = RGB( 128, 128, 128 )


BackImage
BackImage Property

Description

Specifies the image used to paint the background of the control. If a back image is supplied, any background color properties will be ignored.

If the size of the image is smaller than the area of the control, the image will be tiled so that it covers the entire area of the control.

In order to set the picture of the control, it must be either set using the picture property page of the control, the property table of the host language (if available), or by assigning a picture from another control to this one.

Syntax

[form.]ctButton.BackImage [ = Picture ]

Data Type

Picture

Example

ctButton.BackImage = OLE_Object.Picture


BackStyle
BackStyle Property

Description

Specifies whether the background of the control will be transparent or opaque. Valid values include ...

•	0 - Transparent

•	1 - Opaque

Syntax

[form.]ctButton.BackStyle [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctButton.BackStyle = 0


BorderColor
BorderColor Property

Description

Specifies the color used to paint a regular border around the control.

Syntax

[form.]ctButton.BorderColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctButton.BorderColor = RGB( 128, 128, 128 )


BorderDown
BorderDown Property

Description

Specifies the type of border to place around the control when it is in a down state. Valid values include ...

•	0 - Regular	: Regular border

•	1 - None	: No border

•	2 - Raised	: Raised 3D border

•	3 - Lowered	: Lowered 3D border

Syntax

[form.]ctButton.BorderDown [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctButton.BorderDown = 2


BorderOver
BorderOver Property

Description

Specifies the type of border to place around the control when the mouse is moving over it. Valid values include ...

•	0 - Regular	: Regular border

•	1 - None	: No border

•	2 - Raised	: Raised 3D border

•	3 - Lowered	: Lowered 3D border

•	4 - Default	: BorderType border

Syntax

[form.]ctButton.BorderOver [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctButton.BorderOver = 2


BorderType
BorderType Property

Description

Specifies the type of border to place around the control. Valid values include ...

•	0 - Regular	: Regular border

•	1 - None	: No border

•	2 - Raised	: Raised 3D border

•	3 - Lowered	: Lowered 3D border

Syntax

[form.]ctButton.BorderType [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctButton.BorderType = 2


Caption
Caption Property

Description

Specifies the text to be displayed in the button.

Syntax

[form.]ctButton.Caption [ = string% ]

Data Type

String

Example

ctButton.Caption = "Printer"


DisableColor
DisableColor Property

Description

Specifies the color used to paint the Caption when the control is disabled.

Syntax

[form.]ctButton.DisableColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctButton.DisableColor = RGB( 128, 128, 128 )


DownColor
DownColor Property

Description

Specifies the color used to paint the button when it is down or being clicked on.

Syntax

[form.]ctButton.DownColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctButton.DownColor = RGB( 128, 128, 128 )


DrawFocus
DrawFocus Property

Description

Specifies whether or not a focus border will be drawn around the caption when the control has focus.

Syntax

[form.]ctButton.DrawFocus [ = { True | False } ]

Data Type

Boolean

Example

ctButton.DrawFocus = TRUE


EraseBkGnd
EraseBkGnd Property

Description

Specifies whether or not the background of the control will be erased before the button is drawn.

This option may be useful when you have a large bitmap that must be drawn. By not erasing the background, the amount of flash or flicker is greatly reduced. If the button image is mostly a bitmap, the bitmap itself will draw over the old image. However, by not erasing the background, parts of a previous draw may remain (i.e. if you change borders as the mouse moves over the control, both borders will remain drawn). Therefor, setting this property to a value of TRUE for regular style buttons is not recommended.

Syntax

[form.]ctButton.EraseBkGnd [ = { True | False } ]

Data Type

Boolean

Example

ctButton.EraseBkGnd = TRUE


FocusBackColor
FocusBackColor Property

Description

Specifies the color used to paint the background of the button when it has focus.

Syntax

[form.]ctButton.FocusBackColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctButton.FocusBackColor = RGB( 128, 128, 128 )


FocusForeColor
FocusForeColor Property

Description

Specifies the color used to paint the text of the button when it has focus.

Syntax

[form.]ctButton.FocusForeColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctButton.FocusForeColor = RGB( 128, 128, 128 )


Font
Font Property

Description

Specifies the font used for the text within the control when the mouse is not over it.

In order to set the font of the control, it must be either set using the font property page of the control, the property table of the host language ( if available ), or by assigning a font from another control with the same font type to this one.

Syntax

[form.]ctButton.Font [ = Font ]

Data Type

Font

Example

ctButton.Font = lbl_Text.Font


FontOver
FontOver Property

Description

Specifies the font used for the text within the control when the mouse is over it.

In order to set the font of the control, it must be either set using the font property page of the control, the property table of the host language ( if available ), or by assigning a font from another control with the same font type to this one.

Syntax

[form.]ctButton.FontOver [ = Font ]

Data Type

Font

Example

ctButton.FontOver = lbl_Text.Font


ForeColor
ForeColor Property

Description

Specifies the color used to paint the caption when the control is not disabled and the mouse is not moving over it.

Syntax

[form.]ctButton.ForeColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctButton.ForeColor = RGB( 128, 128, 128 )


ForeColorOver
ForeColorOver Property

Description

Specifies the color used to paint the caption when the control is not disabled but the mouse is moving over it.

Syntax

[form.]ctButton.ForeColorOver [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctButton.ForeColorOver = RGB( 128, 128, 128 )


ImageXOffset
ImageXOffset Property

Description

Specifies the horizontal offset used to calculate the starting position of the BackImage property.

Syntax

[form.]ctButton.ImageXOffset [ = setting% ]

Data Type

Integer

Example

ctButton.ImageXOffset = 1


ImageYOffset
ImageYOffset Property

Description

Specifies the vertical offset used to calculate the starting position of the BackImage property.

Syntax

[form.]ctButton.ImageYOffset [ = setting% ]

Data Type

Integer

Example

ctButton.ImageYOffset = 1


LineColorDark
LineColorDark Property

Description

Specifies the color used to paint dark side of a raised border.

Syntax

[form.]ctButton.LineColorDark [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctButton.LineColorDark = RGB( 128, 128, 128 )


LineColorLight
LineColorLight Property

Description

Specifies the color used to paint light side of a raised border.

Syntax

[form.]ctButton.LineColorLight [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctButton.LineColorLight = RGB( 128, 128, 128 )


MaskBitmap
MaskBitmap Property

Description

Specifies whether to make bitmap pictures transparent or not. Transparent areas in a bitmap will be determined by the MaskColor property.

Syntax

[form.]ctButton.MaskBitmap [ = { True | False } ]

Data Type

Boolean

Example

ctButton.MaskBitmap = TRUE


MaskColor
MaskColor Property

Description

Specifies the color used for transparency when using a transparent bitmap picture. For example, if we set this property to a value of 255 (red), all red areas on the bitmap will show up as transparent.

Syntax

[form.]ctButton.MaskColor [ = color& ]

Data Type

Long ( OLE_COLOR )

Example

ctButton.MaskColor = RGB( 128, 128, 128 )


MouseIcon
MouseIcon Property

Description

Specifies the custom image used for the cursor when the mouse moves over the control. This property will only accept valid icon or cursor images. This property will not be used unless the MousePointer property is set to a value of 99 (custom).

Syntax

[form.]ctButton.MouseIcon [ = Picture ]

Data Type

Picture

Example

ctButton.MouseIcon = Icon.Picture


MousePointer
MousePointer Property

Description

Specifies the mouse pointer to be used when the mouse is passing over the control. Valid values include ...

•	0 - Default

•	1 - Arrow

•	2 - Cross

•	3 - Beam

•	4 - Icon

•	5 - Size

•	6 - Size NE SW

•	7 - Size NS

•	8 - Size NW SE

•	9 - Size WE

•	10 - Up Arrow

•	11 - Hourglass

•	12 - No Drop

•	13 - App Starting

•	14 - Question

•	15 - Size All

•	99 - Custom

Syntax

[form.]ctButton.MousePointer [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctButton.MousePointer = 2


MultiLine
MultiLine Property

Description

Specifies the multi-line status and alignment of the text on the button. Valid values include ...

•	0 - None     	: Single line caption

•	1 - Left	: Multi-line, left justified

•	2 - Right	: Multi-line, right justified

•	3 - Center     	: Multi-line, text centered

Syntax

[form.]ctButton.MultiLine [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctButton.MultiLine = 2


OffsetPicture
OffsetPicture Property

Description

Specifies whether or not the image in the button will be offset when the button is in a down state.

By default, images and text are offset when a button is in a down state. However, in some cases, the programmer might be using an image for the down state that has already been offset. In that case, an additional offset is not required. This property allows the programmer to prevent the additional offset.

Syntax

[form.]ctButton.OffsetPicture [ = { True | False } ]

Data Type

Boolean

Example

ctButton.OffsetPicture = TRUE


ParentHwnd
ParentHwnd Property

Description

Specifies the handle of the parent window of the control. When a valid windows handle is provided to this property, the background of the parent window will be re-drawn when this control needs to be re-drawn. This is only necessary if their are re-draw poblems with the parent window. This property is only available at run-time.

Syntax

[form.]ctButton.ParentHwnd [ = setting% ]

Data Type

Long

Example

ctButton.ParentHwnd = Form1.Hwnd

Also See

Compatibility Issues


PicOnly
PicOnly Property

Description

Specifies whether or not only the picture (no text) will be displayed in the button.

Syntax

[form.]ctButton.PicOnly [ = { True | False } ]

Data Type

Boolean

Example

ctButton.PicOnly = TRUE


PicPosition
PicPosition Property

Description

Specifies the position of the bitmap in relation to the caption. Valid values are ...

•	0 - None   	 	: No picture on the button

•	1 - Top	: Picture on top of the text

•	2 - Bottom 	: Picture under the text

•	3 - Left	: Picture to the left of the text

•	4 - Right    	: Picture to the right of the text

•	5 - Center    	: Center the picture in the button

Syntax

[form.]ctButton.PicPosition [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctButton.PicPosition = 2


Picture
Picture Property

Description

Specifies the main image to be displayed in the button.

In order to set the picture of the control, it must be either set using the picture property page of the control, the property table of the host language ( if available ), or by assigning a picture from another control to this one.

Syntax

[form.]ctButton.Picture [ = Picture ]

Data Type

Picture

Example

ctButton.Picture = OLE_Object.Picture


PictureDisabled
PictureDisabled Property

Description

Specifies the image to be displayed in the button when the button is disabled. If no picture is specified here, the image in the Picture property will be used when the control is disabled.

In order to set the picture of the control, it must be either set using the picture property page of the control, the property table of the host language ( if available ), or by assigning a picture from another control to this one.

Syntax

[form.]ctButton.PictureDisabled [ = Picture ]

Data Type

Picture

Example

ctButton.PictureDisabled = OLE_Object.Picture


PictureDown
PictureDown Property

Description

Specifies the image to be displayed in the button when the button is being pressed (or down). If no picture is specified here, the image in the Picture property will be used when the control is down.

In order to set the picture of the control, it must be either set using the picture property page of the control, the property table of the host language ( if available ), or by assigning a picture from another control to this one.

Syntax

[form.]ctButton.PictureDown [ = Picture ]

Data Type

Picture

Example

ctButton.PictureDown = OLE_Object.Picture


PictureOver
PictureOver Property

Description

Specifies the image to be displayed in the button when the mouse is moving over it. If no picture is specified here, the image in the Picture property will be used when the control is disabled.

In order to set the picture of the control, it must be either set using the picture property page of the control, the property table of the host language ( if available ), or by assigning a picture from another control to this one.

Syntax

[form.]ctButton.PictureOver [ = Picture ]

Data Type

Picture

Example

ctButton.PictureOver = OLE_Object.Picture


PicXOffset
PicXOffset Property

Description

Specifies the horizontal offset value used to calculate the position of a picture on the button.

Syntax

[form.]ctButton.PicXOffset [ = setting% ]

Data Type

Integer

Example

ctButton.PicXOffset = 4


PicYOffset
PicYOffset Property

Description

Specifies the vertical offset value used to calculate the position of a picture on the button.

Syntax

[form.]ctButton.PicYOffset [ = setting% ]

Data Type

Integer

Example

ctButton.PicYOffset = 4


RectBottom
RectBottom Property

Description

Specifies the bottom coordinate of the control in relation to the parent window. This is only necessary if their are re-draw poblems with the parent window. This property is only available at run-time.

Syntax

[form.]ctButton.RectBottom [ = setting% ]

Data Type

Long

Example

ctButton.RectBottom = 100

Also See

Compatibility Issues


RectLeft
RectLeft Property

Description

Specifies the left coordinate of the control in relation to the parent window. This is only necessary if their are re-draw poblems with the parent window. This property is only available at run-time.

Syntax

[form.]ctButton.RectLeft [ = setting% ]

Data Type

Long

Example

ctButton.RectLeft = 100

Also See

Compatibility Issues


RectRight
RectRight Property

Description

Specifies the right coordinate of the control in relation to the parent window. This is only necessary if their are re-draw poblems with the parent window. This property is only available at run-time.

Syntax

[form.]ctButton.RectRight [ = setting% ]

Data Type

Long

Example

ctButton.RectRight = 100

Also See

Compatibility Issues


RectTop
RectTop Property

Description

Specifies the top coordinate of the control in relation to the parent window. This is only necessary if their are re-draw poblems with the parent window. This property is only available at run-time.

Syntax

[form.]ctButton.RectTop [ = setting% ]

Data Type

Long

Example

ctButton.RectTop = 100

Also See

Compatibility Issues


SoundClick
SoundClick Property

Description

Specifies the name of a wave (.wav) file to be played when the button is clicked on.

Syntax

[form.]ctButton.SoundClick [ = string% ]

Data Type

String

Example

ctButton.SoundClick = "c:\ctClick.wav"


SoundOver
SoundOver Property

Description

Specifies the name of a wave (.wav) file to be played when the mouse first starts to move over the button.

Syntax

[form.]ctButton.SoundOver [ = string% ]

Data Type

String

Example

ctButton.SoundOver = "c:\ctWhoosh.wav"


State
State Property

Description

Specifies whether the button is in an up ( true ) or down ( false ) state.

Syntax

[form.]ctButton.State [ = { True | False } ]

Data Type

Boolean

Example

ctButton.State = TRUE


TextAlign
TextAlign Property

Description

Specifies the horizontal alignment of the text within the button. This property will have no effect unless the MultiLine property is set to a value of 0 (None). Valid values include ...

•	0 - Left

•	1 - Right

•	2 - Center

Syntax

[form.]ctButton.TextAlign [ = setting% ]

Data Type

Integer ( enumerated )

Example

ctButton.TextAlign = 2


TextXOffset
TextXOffset Property

Description

Specifies the horizontal offset value used to calculate the position of the text in the button.

Syntax

[form.]ctButton.TextXOffset [ = setting% ]

Data Type

Integer

Example

ctButton.TextXOffset = 4


TextYOffset
TextYOffset Property

Description

Specifies the vertical offset value used to calculate the position of the text in the button.

Syntax

[form.]ctButton.TextYOffset [ = setting% ]

Data Type

Integer

Example

ctButton.TextYOffset = 4


Toggle
Toggle Property

Description

Specifies whether the button will toggle when it is pressed (one click brings it down, another brings it up).

Syntax

[form.]ctButton.Toggle [ = { True | False } ]

Data Type

Boolean

Example

ctButton.Toggle = TRUE


CheckStatus
CheckStatus Method

Description

Forces the button to determine its current status (i.e. button down, mouse over, etc.) and re-paint itself if it's in the wrong state.

Syntax

[form.]ctButton.CheckStatus( )

Return Type

void

Parameters

None

Example

ctButton.CheckStatus


ReDraw
ReDraw Method

Description

Force the control to re-paint itself.

Syntax

[form.]ctButton.ReDraw( )

Return Type

void

Parameters

None

Example

ctButton.ReDraw


MouseOn
MouseOn Event

Description

Occurs when the mouse initially moves over the control.

Parameters

None