BBjToolButton::getVerticalTextPosition

Description

In BBj 18.20 and higher, this method returns the vertical position of the text in the BBjToolButton control (relative to the image).

Syntax

Return Value

Method

int

getVerticalTextPosition()

Parameters

None.

Return Value

Returns one of the following constants:

CENTER

TOP

BOTTOM

Remarks

The default vertical text position is CENTER.

Example

rem ' BBjToolButton::getVerticalTextPosition

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
title$ = "BBjToolButton::getVerticalTextPosition"
window! = sysgui!.addWindow(100,100,820,350,title$,$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")

ImageManager! = sysgui!.getImageManager()
Image! = ImageManager!.loadImageFromFile("bbj.ico")

id = 100,width = 150,height = 100
for vertical = 0 to 2
    y = vertical*(height+10)+10
    switch vertical
        case 0; va = sysgui!.TOP,va$ = "TOP"; break
        case 1; va = sysgui!.CENTER,va$ = "CENTER"; break
        case 2; va = sysgui!.BOTTOM,va$ = "BOTTOM"; break
    swend
    for horizontal = 0 to 4
        x = horizontal*(width+10)+10,id = id+1
        switch horizontal
            case 0; ha = sysgui!.LEFT,ha$ = "LEFT"; break
            case 1; ha = sysgui!.CENTER,ha$ = "CENTER"; break
            case 2; ha = sysgui!.RIGHT,ha$ = "RIGHT"; break
            case 3; ha = sysgui!.LEADING,ha$ = "LEADING"; break
            case 4; ha = sysgui!.TRAILING,ha$ = "TRAILING"; break
        swend
        toolbutton! = window!.addToolButton(id,x,y,width,height,"")
        toolbutton!.setText(va$+","+ha$)
        toolbutton!.setImage(Image!)
        toolbutton!.setVerticalTextPosition(va)
        toolbutton!.setHorizontalTextPosition(ha)
        print toolbutton!.getText(),": getVerticalTextPosition",
        print toolbutton!.getVerticalTextPosition()
    next horizontal
next vertical

process_events

eoj:
release

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.