View on GitHub

UI-with-Classes

Collection of 4D classes dedicated to user interface management, designed to structure the UI and make code more readable, maintainable, and reusable.

rect

The rect class provides an interface for manipulating the → of a widget.

This class is available from the cs class store, or cs.ui class store if you use the UI component.


ℹ️ Conventions

To simplify the distinction between form objects and object type, this documentation uses the term widget for all form objects, whether static (a line, a rectangle…) or not (a button, a subform…).


cs.rect.new()

cs.rect.new( widget : Object ) : cs.rect
cs.rect.new ( name : Text ) : cs.rect
cs.rect.new ( width : Integer; height : Integer ) : cs.rect
cs.rect.new ( ) : cs.rect

Parameter Type   Description
widget Object A widget class object like cs.static, cs.input, cs.button
name Text A name of a widget
width
height
Integer Sizes in pixels, in the form coordinate system*.
result cs.rect New cs.rect

* Origin is top left corner of current form

Description

cs.rect.new() creates & returns a new instance of the class.

Properties & Functions

Properties

Properties Description Type Writable
.height
.width
Height & width, in pixels Integer x