RectControl

From REALbasicWiki

Jump to: navigation, search
RectControl class
Available on Mac OS X Linux Windows
General
Superclass Control
Interfaces none
Constants

none

Methods
  • Sub AcceptFileDrop( fileType As String )
  • Sub AcceptPictureDrop( )
  • Sub AcceptRawDataDrop( dataType As String )
  • Sub AcceptTextDrop( )
  • Sub DrawInto( g As Graphics, x As Integer, y As Integer )
  • Sub Invalidate( EraseBackground As Boolean = True )
  • Sub Invalidate( X as Integer, Y as Integer, Width as Integer, Height as Integer, [EraseBackground as Boolean] )
  • Function NewDragItem( Left As Integer, Top As Integer, Width As Integer, Height As Integer ) As DragItem
  • Sub Refresh( EraseBackground As Boolean = True )
  • Sub RefreshRect( x As Integer, y As Integer, Width As Integer, Height As Integer, EraseBackground As Boolean = True )
  • Sub SetFocus( )
Properties
  • Active As Boolean
  • AutoDeactivate As Boolean
  • Enabled As Boolean
  • Height As Integer
  • HelpTag As String
  • Left As Integer
  • LockBottom As Boolean
  • LockLeft As Boolean
  • LockRight As Boolean
  • LockTop As Boolean
  • MouseCursor As MouseCursor
  • Parent As Control
  • TabIndex As Integer
  • TabStop As Boolean
  • Top As Integer
  • Visible As Boolean
  • Width As Integer
  • Window As Window
Events
  • Function ConstructContextualMenu( Base As MenuItem, x As Integer, y As Integer ) As Boolean
  • Function ContextualMenuAction( HitItem As MenuItem ) As Boolean
  • Function DragEnter( obj As DragItem, Action As Integer ) As Boolean
  • Sub DragExit( obj As DragItem, Action As Integer )
  • Function DragOver( x As Integer, y As Integer, obj As DragItem, Action As Integer ) as Boolean
  • Sub DropObject( obj As DragItem, Action As Integer )
  • Function KeyDown( key As String ) As Boolean
  • Sub KeyUp( Key as String )
  • Sub MouseEnter( )
  • Sub MouseExit( )
  • Sub MouseMove( x As Integer, y As Integer )
  • Function MouseWheel( x As Integer, y as Integer, DeltaX As Integer, DeltaY As Integer ) As Boolean

NOTE: You can get descriptions of the items above from the REALbasic documentation.

RectControl is the base class for most controls which can be dragged onto windows, such as BevelButton, Canvas, CheckBox etc. It is not used in its own right but its methods, properties and events can be accessed in most of its children.

Contents

[edit] Superclass

RectControl inherits from Control, which contains some extra properties and events which are available to RectControls.

[edit] Methods

[edit] Sub AcceptFileDrop( fileType As String )

Allows documents of the specified FileType to cause the DropObject Event to fire if they are dropped on the control

[edit] Sub AcceptPictureDrop( )

Allows pictures to cause the DropObject Event to fire if they are dropped on the control

[edit] Sub AcceptRawDataDrop( dataType As String )

Allows data of the specified type to cause the DropObject Event to fire if they are dropped on the control

[edit] Sub AcceptTextDrop( )

Allows text to cause the DropObject Event to fire if it is dropped on the control

[edit] Sub DrawInto( g As Graphics, x As Integer, y As Integer )

Draws the RectControl (as it would appear on the screen) into g.

[edit] Sub Invalidate( EraseBackground As Boolean = True )

flags the control as needing to be redrawn when the OS is refreshing the graphics system. The EraseBackground parameter decides whether the background is erased before redrawing.

[edit] Function NewDragItem( Left As Integer, Top As Integer, Width As Integer, Height As Integer ) As DragItem

Defines the rectangle that will be displayed to represent dragging from the control.

[edit] Sub Refresh( EraseBackground As Boolean = True )

Redraws the control. The EraseBackground parameter decides whether the background is erased before redrawing.

[edit] Sub RefreshRect( x As Integer, y As Integer, Width As Integer, Height As Integer, EraseBackground As Boolean = True )

Redraws part of the control specified by the rectangle described by the first 4 parameters. The EraseBackground parameter decides whether the background is erased before redrawing.

[edit] Sub SetFocus( )

Sets the focus to this control, if it is capable of receceiving focus.

[edit] Properties

[edit] Active As Boolean

(ReadOnly)

[edit] AutoDeactivate As Boolean

Set this property to False if you do not want the control's Active property to be set to false when the RectControl's parent window is not the active window.

[edit] Enabled As Boolean

Set this property to False if you do not want the control to be able to be clicked or to receive focus.

[edit] Height As Integer

Gets/sets the control's height in pixels

[edit] HelpTag As String

Gets/sets the text which is displayed in the control's ToolTip(Win32/Linux) or HelpTag(Mac)

[edit] Left As Integer

Gets/sets the control's distance from the left edge of its parent window in pixels

[edit] LockBottom As Boolean

If set to True, the control will maintain a fixed distance from its parent's bottom edge, when the parent is resized.

[edit] LockLeft As Boolean

If set to True, the control will maintain a fixed distance from its parent's left edge, when the parent is resized. If LockRight is also True, the control will be resized.

[edit] LockRight As Boolean

If set to True, the control will maintain a fixed distance from its parent's right edge, when the parent is resized.

[edit] LockTop As Boolean

If set to True, the control will maintain a fixed distance from its parent's top edge, when the parent is resized. If LockBottom is also True, the control will be resized.

[edit] MouseCursor As MouseCursor

The pointer to be displayed while the mouse is over the control

[edit] Parent As Control

Sets/gets the control's parent. Nil means the parent is a window.

[edit] Top As Integer

Gets/sets the control's distance from the top edge of its parent window in pixels

[edit] Visible As Boolean

Gets/sets whether the control is visible

[edit] Width As Integer

Gets/sets the control's width in pixels

[edit] Window As Window

Returns a reference to the container control or Window that contains the control

[edit] Events

[edit] Function ConstructContextualMenu( Base As MenuItem, x As Integer, y As Integer ) As Boolean

[edit] Function ContextualMenuAction( HitItem As MenuItem ) As Boolean

[edit] Function DragEnter( obj As DragItem, Action As Integer ) As Boolean

[edit] Sub DragExit( obj As DragItem, Action As Integer )

[edit] Function DragOver( x As Integer, y As Integer, obj As DragItem, Action As Integer ) as Boolean

[edit] Sub DropObject( obj As DragItem, Action As Integer )

[edit] Function KeyDown( key As String ) As Boolean

[edit] Sub MouseEnter( )

[edit] Sub MouseExit( )

[edit] Sub MouseMove( x As Integer, y As Integer )

[edit] Function MouseWheel( x As Integer, y as Integer, DeltaX As Integer, DeltaY As Integer ) As Boolean

Personal tools
related