Progress
Programming
Handbook


Three-dimensional Effects (Windows only; Graphical interfaces only)

On Windows, in graphical interfaces, you can specify that all widgets in a particular frame or dialog box have a three-dimensional look and feel. (In character interfaces, this specification is ignored.) By default, buttons, sliders, and browses already display with a three-dimensional appearance. By specifying the THREE–D Frame phrase option or by setting the THREE–D frame or dialog box option to TRUE, most other widgets in the specified frame or dialog box display with a three-dimensional appearance, including the toggle box, radio set, editor, selection list, and combo box widgets. This also means that the frame background color becomes color Button Face rather than color Window. Note that you can only set the THREE–D attribute before the frame or dialog box is realized.

NOTE: The THREE–D look and feel is the preferred style on Windows 95 and Windows NT 4.0 platforms. The THREE–D style provides an overall consistent look to the user interface, thereby accommodating such widgets as the combo box, radio set, toggle box, and LARGE editor, which cannot be displayed in two dimensions on these platforms.

The following procedure, p-threed.p, displays two frames that are identical, except that one is two-dimensional and the other is three-dimensional.

p-threed.p
DEFINE BUTTON bOK LABEL "OK".
DEFINE VARIABLE vSlide AS INTEGER LABEL "Slider"
    VIEW-AS SLIDER MAX-VALUE 10 MIN-VALUE 1.
DEFINE VARIABLE vToggle AS LOGICAL LABEL "Toggle"
    VIEW-AS TOGGLE-BOX.
DEFINE VARIABLE vRadio AS INTEGER LABEL "Radio Set"
    VIEW-AS RADIO-SET RADIO-BUTTONS "First", 1, "Middle", 2, "Last", 3.
DEFINE VARIABLE vEdit AS CHARACTER LABEL "Editor"
    VIEW-AS EDITOR SIZE 60 by 2.
DEFINE VARIABLE vCombo AS CHARACTER LABEL "Combo Box"
    VIEW-AS COMBO-BOX LIST-ITEMS "Red", "White", "Blue", "Purple".
DEFINE FRAME D2-Frame 
    vSlide vToggle vRadio SKIP vEdit SKIP vCombo SKIP bOK
WITH AT COLUMN 8 ROW 1.1 SIDE-LABELS 
     TITLE "Two Dimensional Frame".
DEFINE FRAME D3-Frame
    vSlide vToggle vRadio SKIP vEdit SKIP vCombo SKIP bOK
WITH AT COLUMN 8 ROW 9 THREE-D SIDE-LABELS 
     TITLE "Three Dimensional Frame". 
     
CURRENT-WINDOW:TITLE = "".
ENABLE ALL WITH FRAME D2-Frame.
ENABLE ALL WITH FRAME D3-Frame.

WAIT-FOR CHOOSE OF bOK IN FRAME D2-Frame OR 
         CHOOSE OF bOK IN FRAME D3-Frame. 

When you run p-threed.p, the following window appears:


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095