ctl32_scontainer: overview | members | pictures
Remarks:
MouseWeel scrolls the client container up/down. Shift +
MouseWheel scrolls the client container left/right.
If the client container is an image control, Ctrl + MouseWheel
will zoom in/out on the image.
Double Click on the image will restore it to the original size.
I need help with the code to keep the image centered when zoomin
in/out, that part is not finished yet.
Properties
ctlAbout
Value Type: Character
Default Value: class name and author(s).
R/W: Read
Returns the name of the class and the name(s) of the programmer(s)
that wrote it.
ctlActiveScrollBars
Value Type: Numeric
Default Value: 0
R/W: Read
Specifies whether scrollbars are needed. It does not indicate if
the scrollbars are visible. Can be used to control an optional scroll
control
0 None
1 Horizontal
2 Vertical
3 Both
ctlAutoCenter
Value Type: Logical
Default Value: .T.
R/W: Read/Write
Specifies whether the child control should be centered in the scrollable
container when the scrollable container is bigger that the child control.
ctlAutoScroll
Value Type: Logical
Default Value: .T.
R/W: Read/Write
Specifies if the control will autoscroll when contained controls
get focus and are out of view.
ctlBackColor
Value Type: Numeric
Default Value: -1
R/W: Read/Write
Specifies the background color. A value of -1 means to use default
background color of textboxes.
ctlBackStyle
Value Type: Numeric
Default Value: 1
R/W: Read/Write
Specifies if the background is transparent or opaque
0: Transparent
1: Opaque (Default)
ctlBorderColor
Value Type: Numeric
Default Value: -1
R/W: Read/Write
Specifies the border color. A value of -1 means to use default border
color of textboxes.
ctlBorderStyle
Value Type: Numeric
Default Value: 1
R/W: Read/Write
Specifies if the control has a border:
0: No border
1: Border (Default)
ctlForceScrollBars
Value Type: Numeric
Default Value: 0
R/W: Read/Write
Specifies whether scrollbars should be always visible. Visible scrollbars
will be disabled when not needed.
0: None
1: Horizontal
2: Vertical
3: Both
ctlHEnabled
Value Type: Logical
Default Value: .F.
R/W: Read
Specifies if the horizontal scrollbar is enabled or required.
ctlHHWnd
Value Type: Numeric
Default Value: 0
R/W: Read
Returns a handle to the horizontal scrollbar control window.
ctlHLargeChange
Value Type: Numeric
Default Value: -1
R/W: Read/Write
Specifies the increment an horizontal scrollbar scrolls when you
click on the scrollbar track.
The Default Value of -1 means the viewport Width. If set to a value
beetwen 0 and 1, the value represents a percentage of the viewport Width.
When set to a value 1 or larger, the value is in pixels or foxels (see
ScaleMode in VFP help).
Example: A value of 0.25 will scroll a distance equal to 25% of the
viewport width.
ctlHMargin
Value Type: Numeric
Default Value: 5
R/W: Read/Write
Specifies the horizontal margin to use when autoscrolling to the
active control. The value is in pixels or foxels (see ScaleMode in VFP
help).
ctlHSmallChange
Value Type: Numeric
Default Value: 20
R/W: Read/Write
Specifies the increment an horizontal scrollbar scrolls when you
click on a scroll arrow. The value is in pixels or foxels (see ScaleMode
in VFP help).
ctlHValue
Value Type: Numeric
Default Value: 0
R/W: Read/Write
Sets or returns the actual horizontal scroll value of the client
control.
ctlHVisible
Value Type: Logical
Default Value: .F.
R/W: Read
Specifies if the horizontal scrollbar is visible.
ctlHWheelChange
Value Type: Numeric
Default Value: 40
R/W: Read/Write
Specifies the increment an horizontal scrollbar scrolls when you
use the mouse wheel. The value is in pixels or foxels (see ScaleMode
in VFP help).
ctlScrollBars
Value Type: Numeric
Default Value: 3
R/W: Read/Write
Specifies which scrollbars should be visible if needed.
0: None
1: Horizontal
2: Vertical
3: Both
ctlVersion
Value Type: Character
Default Value: class version information
R/W: Read
Returns version information about the class.
ctlVEnabled
Value Type: Logical
Default Value: .F.
R/W: Read
Specifies if the vertical scrollbar is enabled or required.
ctlVcxCommon 2006XXXX
Value Type: Character
Default Value: ctl32_common.vcx
R/W: Read/Write
Specifies the location and file name of the ctl32_common vcx file
ctlVcxStructs 2006XXXX
Value Type: Character
Default Value: ctl32_structs.vcx
R/W: Read/Write
Specifies the location and file name of the ctl32_sctrucs vcx
file
ctlVersion
Value Type: Numeric
Default Value: Version number.
R/W: Read
Returns the version number of the class in the format YYYYMMDD, for
example 20060925.
ctlVHWnd
Value Type: Numeric
Default Value: 0
R/W: Read
Returns a handle to the horizontal scrollbar control window.
ctlVLargeChange
Value Type: Numeric
Default Value: -1
R/W: Read/Write
Specifies the increment a vertical scrollbar scrolls when you click
on the scrollbar track.
The Default Value of -1 means the viewport Height. If set to a value
beetwen 0 and 1, the value represents a percentage of the viewport Height.
When set to a value 1 or larger, the value is in pixels or foxels (see
ScaleMode in VFP help).
Example: A value of 0.5 will scroll a distance equal to 50% of the
viewport height.
ctlVMargin
Value Type: Numeric
Default Value: 5
R/W: Read/Write
Specifies the vertical margin to use when autoscrolling to the active
control. The value is in pixels or foxels (see ScaleMode in VFP help).
ctlVSmallChange
Value Type: Numeric
Default Value: 20
Specifies the increment a vertical scrollbar scrolls when you click
on a scroll arrow. The value is in pixels or foxels (see ScaleMode in
VFP help).
Read/Write.
ctlVValue
Value Type: Numeric
Default Value: 0
R/W: Read/Write
Sets or returns the actual vertical scroll value of the client control.
ctlVVisible
Value Type: Logical
Default Value: .F.
R/W: Read
Specifies if the vertical scrollbar is visible.
ctlVWheelChange
Value Type: Numeric
Default Value: 40
R/W: Read/Write
Specifies the increment a vertical scrollbar scrolls when you use
the mouse wheel. The value is in pixels or foxels (see ScaleMode in
VFP help).
ctlZoom 2006XXXX
Value Type: Numeric
Default Value: 100
R/W: Read
Specifies the amount of present zoom a client image container
has, as a percentage. 100% is normal size. The cient image size can
be changed with Ctrl + MouseWheel.
Events
ctlScrolled
Parameters: nDirection
Occurs when the client control is scrolled.
0: Up arrow on vertical scroll bar. 1: Down arrow on vertical scroll bar. 2: Vertical scroll bar in area above the scroll box. 3: Vertical scroll bar in area below the scroll box 4: Thumb has finished moving on vertical scroll bar. 5: Thumb is been draged on vertical scroll bar. 6: Top selected in context menu on vertical scroll bar. 7: Bottom selected in context menu on vertical scroll bar.
10: Left arrow on horizontal scroll bar. 11: Right arrow on horizontal scroll bar. 12: Horizontal scroll bar in area to the left of the scroll box. 13: Horizontal scroll bar in area to the right of the scroll box. 14: Thumb has finished moving on horizontal scroll bar. 15: Thumb is been draged on horizontal scroll bar. 16: Left border selected in context menu on horizontal scroll bar. 17: Right border selected in context menu on horizontal scroll bar.
Methods
ctlDoScroll
Parameters: nDirection
0 Scroll Line up SmallChange 1 Scroll Line down SmallChange 2 Scroll Page up LargeChange 3 Scroll Page down LargeChange 4 No action 5 No action 6 Scroll Top 7 Scroll Bottom
10 Scroll Line left SmallChange 11 Scroll Line right SmallChange 12 Scroll Page left LargeChange 13 Scroll Page right LargeChange 14 No action 15 No action 16 Scroll Left 17 Scroll Right
The nDirection parameter is set up this way so it matches the nDirection
parameter used in the Scrolled event.
ctlRestoreSize 20061010
If the client control is an image control, this method will
restore it to the original size, if the size has been changed by
using the Ctrl-MouseWheel key combination. This method is fired by
double-clicking in the client image control.
Note
All properties and methods with a name that starts with "ctl32_" are
only for internal use by the class itself.
|