Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

The CheckBox edit style – PB Docs 126 – PowerBuilder Library

The CheckBox edit style – PB Docs 126

The CheckBox edit style

If a column can take only one of two (or perhaps three) values,
you might want to display the column as a check box; users can
select or clear the check box to specify a value. In the following
entry from a DataWindow object, users can simply check or clear a
box to indicate whether an employee has health insurance:

dwdis14.gif

proc.png To use the CheckBox edit style:

  1. Select CheckBox from the Style Type list
    and specify properties for that style.

  2. In the Text box, enter the text you want displayed next
    to the check box.

    note.png Using accelerator keys

    If the CheckBox has an accelerator key, enter an ampersand
    (&) before the letter in the text that represents the accelerator
    key.

  3. In the Data Value For boxes, enter the values you want put
    in the DataWindow buffer when the CheckBox is checked (on) or unchecked (off).

    If you selected the 3 States box, an optional third state
    box (other) appears, for the case when the condition is neither
    on nor off.

What happens

The value you enter in the Text box becomes the display value,
and values entered for On, Off, and Other become the data values.

When users check or clear the check box at runtime, PowerBuilder enters
the appropriate data value in its buffer. When the Update method
is called, PowerBuilder sends the corresponding data values to the
database.

Centering check boxes without text

You may find it useful to center check boxes used for columns
of information. First make the text control used for the column
header and the column control the same size and left aligned. Then
you can center the check boxes and the column header.

proc.png To center check boxes without text:

  1. In the Edit property page for the column,
    make sure the Left Text check box is not selected and that the Text
    box where you specify associated text is empty.

  2. In the General property page, specify centering
    (Alignment>Center) or specify centering using the StyleBar.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x