borderStyle
Type: Integer
Availability: Read or write at any time
The borderStyle property contains the border style for a window. The borderStyle property settings for a Form subclass are listed in the following table.
Window Class Constant | Value | Description |
---|---|---|
BorderStyle_None | 0 | None. A form with no border has no Maximize or Minimize button, Control-Menu icon, or caption display. If the form has a menu, the setting is changed to fixed single. |
BorderStyle_Single | 1 | Can include Control-Menu icon, title bar, Maximize button, and Minimize button. Resizable only using Maximize and Minimize buttons. For forms defined as Web pages, the border is single and sizable. |
BorderStyle_Sizable | 2 | For forms defined as Web pages, the border is double (the default). |
BorderStyle_Double | 3 | Not resizable. |
Although a form can have any border style, you must ensure that the user can unload the form from the logic associated with a button or menu item if the form does not have a Control-Menu icon.
Defining an MDI child form with the controlBox, maxButton, or minButton property set to false affects the way that the form is displayed and behaves when it is maximized. For example, the form cannot be restored to a non-maximized state without switching to another MDI child form, by using Ctrl+F6, and then using the Restore Control-Menu command of that form.
If the form is skinned, the default form system menu reflects whether Java allows maximize and minimize operations according to the value of the borderStyle property.
The borderStyle property settings listed in the following table apply to individual control classes. (The border style that you define for a specific control does not affect any global settings in the application.)
Class Constant | Class | Value | Description |
---|---|---|---|
BorderStyle_None | Window | 0 | No border |
BorderStyle_Single | Window | 1 | Fixed-single-line border (the default) |
BorderStyle_3DSunken | Control | 2 | Sunken three-dimensional effect (two pixels) |
BorderStyle_3DRaised | Control | 3 | Raised three-dimensional effect (two pixels) |
When the borderStyle property is set to BorderStyle_Single, you can set the border color to a specific color if you do not want the default color of black used; for example, you could set the value of the borderColorSingle property to red (255) to indicate at run time that information has not been provided in that control.
All controls can use the border styles listed in this table, with the following exceptions.
-
Folder control, as no border is ever drawn.
If the value of the borderStyle property for the active sheet of a Folder control is set to any value other than BorderStyle_None, the folder does not display a border of its own for the sheet area.
-
Ocx, ActiveXControl, and MultiMedia classes permit the BorderStyle_None and BorderStyle_Single styles only, because the border of these controls is not drawn by JADE.
-
GroupBox class, as the BorderStyle_3DSunken and BorderStyle_3DRaised styles produce the existing three-dimensional effect.
The border of a GroupBox control is usually black. If the backColor property of a group box is set to gray, the border is drawn with three-dimensional (3D) effects.
No border area is drawn for a docking control when it is the child of a floating form.
Windows will not create a form that has a caption line with a single border but instead creates a form with a fixed double border. If the value of the borderStyle property is set to BorderStyle_Single (1) and the form has a caption line, the value of the borderStyle property is modified to fixed BorderStyle_Double (3), to reflect the actual border style in use.
If the show3D property is set to Show3D_UseAppDefault (0) and the application default setting of the show3D property for the control is true (that is, the control is selected in the 3D Controls list box on the Form sheet of the Define Application dialog) or if the show3D property for the control is set to Show3D_Use3D (2), the effective border is a sunken three-dimensional effect (that is, BorderStyle_3DSunken), regardless of the setting of the borderStyle property.
If the borderStyle property is set to BorderStyle_3DSunken (2) or BorderStyle_3DRaised (3), the show3D property is reset to Show3D_UseBorderStyle (3). If you set the show3D property to Show3D_UseBorderStyle (3), only the borderStyle property is used to control the actual border style that is displayed.
If a control is painted using the 3D feature, the border of that control is painted in the 3D style rather than in black.
The code fragment in the following example shows the use of the borderStyle property.
lbl.borderStyle := BorderStyle_Single;
The following is an example of a check box control with a sunken border and a back-brush that has been set.
The following is an example of a status line that has a sunken three-dimensional border, a back-brush, and no value set for the bevelInner, bevelOuter, or boundaryWidth property.
The first of the following examples shows a button that has a raised three-dimensional effect and the second example is a button that has a sunken three-dimensional effect.
The following is an example of a sheet that has a sunken three-dimensional effect.