2.24 .borderraster

This attribute allows for objects with borders to be configured so that the geometry is calculated in a way as if the object did not possess any borders at all.

Definition

  • Data type

    boolean

  • Access

    get, set

  • changed event

    yes

Normally, the following adjustments are made for objects with borders:

  • Shifting by one raster unit when calculating the position of an object that contains raster coordinates.
  • Downscaling by one raster unit when calculating the size of an object that possesses a raster size.
  • Shifting by one raster unit when calculating the position of the child object that possesses a raster, provided that the object is able to possess children.

The above mentioned adjustments can be disabled via this attribute. The effect is the same as if the borders of a groupbox object are disabled (.borderwidth := 0).

The difference is that the borders still appear, when .borderraster = false. The attribute can only make an appropriate adjustment if the object possesses a border and if raster coordinates are used. The position (.posraster = true), the size (.sizeraster = true) and where applicable also the position of the child object can be influenced only when their positions are specified in raster units.

The following table provides an overview of the attribute .borderraster along with the Dialog Manager objects that support it:

canvas

supported, when .borderwidth > 0

checkbox

not supported

control

not supported

edittext

supported, when .multiline = true

groupbox

supported, when .borderwidth > 0

image

not supported

layoutbox

supported, when .borderwidth > 0

listbox

supported

notebook

supported

notepage

supported, when .borderwidth > 0

poptext

supported, when .style = listbox

progressbar

not supported

pushbutton

not supported

radiobutton

not supported

rectangle

supported, when .borderwidth > 0

scrollbar

not supported

spinbox

not supported

splitbox

supported, when .borderwidth > 0

statictext

not supported

statusbar

not supported

tablefield

supported

toolbar

supported, when .docking = dock_window OR .borderwidth > 0

treeview

supported

window

supported

Value range

true

The calculation of raster coordinates takes place in the usual way (analog to earlier versions of the ISA Dialog Manager).

For objects with borders this means:

  • The object will be shifted by one half of a raster unit when the position is specified in raster units (.posraster = true).
  • The object will be reduced in size by one raster unit when the size is specified in raster units (.sizeraster = true).
  • The child objects will be shifted by one half of a raster unit when their position is specified in raster units (.posraster = true).

    Note, the object must allow for and possess a child object.

false

The calculation of raster coordinates of an object possessing borders takes place as if the object did not possess borders. The adjustments mentioned at the value “true” do not take place here.

Note

Only those adjustments mentioned at the value “true” are not carried out; even when .borderraster = false is set, it can happen that an object with borders will not appear in the exact same line as another object without borders. This is caused by other factors. These objects would also not be positioned in the exact same line even if they would be positioned in the pixel coordinates.

References and Dependencies

The distinction between objects with and without borders is a ISA Dialog Manager classification and affects the way in which raster coordinates are converted into pixel values. This classification has nothing to do with distinguishing whether a particular window system displays a border around the object or not.

Currently, the classification is as follows:

Objects Without Borders

canvas

when .borderwidth = 0

checkbox

 

control

 

edittext

when .multiline = false

groupbox

when .borderwidth = 0

image

 

layoutbox

when .borderwidth = 0

notepage

when .borderwidth = 0

poptext

when .style <> listbox

progressbar

 

pushbutton

 

radiobutton

 

rectangle

when .borderwidth = 0

scrollbar

 

spinbox

 

splitbox

when .borderwidth = 0

statictext

 

toolbar

when .docking <> dock_window AND .borderwidth = 0

Objects With Borders

canvas

when .borderwidth > 0

edittext

when .multiline = true

groupbox

when .borderwidth > 0

layoutbox

when .borderwidth > 0

listbox

 

notebook

 

notepage

when .borderwidth > 0

poptext

when .style = listbox

rectangle

when .borderwidth > 0

splitbox

when .borderwidth > 0

statusbar

when .borderwidth > 0

tablefield

 

toolbar

when .docking = dock_window OR .borderwidth > 0

treeview

 

window

 

The .borderraster attribute only works on the toolbar object when it is undocked (.docking = dock_window). In a docked state the attribute only works on a child object of a toolbar object (given that: .borderwidth > 0).

If an object does not possess a border, then a change made to .borderraster will have no effect.

When .borderraster is set to false, then objects will not appear in the exact pixel position as before. On the contrary, the effect will be as if the objects in question would have been positioned to the exact same position by setting the pixel coordinates.

Please be aware that objects without borders can also be single-line. These types of objects are centered in the specified raster lines when raster coordinates are used (.posraster = true) and when they have no height (.height = 0).

Single-line Objects

checkbox

 

edittext

when .multiline = false

poptext

when .style <> listbox

progressbar

when .direction = 2

pushbutton

 

radiobutton

 

scrollbar

when .direction = 2

spinbox

 

statictext

 

Other adjustments are carried out even when the attribute .borderraster has the value false. Especially the adjustments with respect to the compatibility to other versions such as .options[opt_wntsizebug_compat] and .options[opt_w2kprefsize_compat] will continue to be carried out.