The RadVBoxLayout class automatically groups RadWidgets in a vertical plane within the available space. The RadVBoxLayout relieves the Lisp programmer of the arduous task of placing the controls at exact locations as the RadVBoxLayout automatically places the controls which are added to it.
Overview
The new function creates a new RadVBoxLayout object and returns a pointer to the newly created object. The RadVBoxLayout is one of the class key words accepted by the qt new: function. There can be many RadVBoxLayout objects. Each RadVBoxLayout object is used to automatically positions the controls add to it.
Syntax
(qt new: RadVBoxLayout:)
Arguments
Returns | Always returns a pointer to the newly created RadVBoxLayout object. |
Example1
;; Build a dialog window with an Okay button and a Sick button. (setq radDialog (qt new: RadDialog: "Dialog Window with an Okay Button")) (setq okayButton (qt new: RadPushButton: "Okay" (lambda(...) (writeln "You pressed Okay") (qt radDialog done: 0)))) (setq sickButton (qt new: RadPushButton: "Sick" (lambda(...) (writeln "You pressed Sick") (qt radDialog done: 1)))) (setq mainLayout (qt new: RadVBoxLayout:)) ;; Here we create the main vertical layout control. (qt mainLayout addWidget: okayButton) ;; Here we add the Okay button to the main vertical layout control. (qt mainLayout addWidget: sickButton) ;; Here we add the Sick button to the main vertical layout control. (qt radDialog setLayout: mainLayout) ;; Here we add the main layout to the dialog window. ;; Display the dialog window and wait for the user to press the Okay or the Sick button. (setq result (qt radDialog exec:)) ;; Display the dialog window and return the code for the button pressed.
Overview
The addLayout adds a RadLayout (RadVBoxLayout or RadVBoxLayout) to the current RadVBoxLayout object. As controls are added to the RadVBoxLayout, they are automatically positioned in asthetic proportion to each other.
Syntax
(qt RadVBoxLayoutPtr addLayout: RadLayoutPtr)
Arguments
RadLayoutPtr | The RadLayout (RadVBoxLayout or RadVBoxLayout) to be added to the current RadVBoxLayout object. |
Returns | Always returns a #void value. |
Example1
;; Build a dialog window with an Okay button and a Sick button. (setq mainLayout (qt new: RadVBoxLayout:)) ;; Here we create the main vertical layout control. (setq subLayout (qt new: RadVBoxLayout:)) ;; Here we create the main vertical layout control. (qt subLayout addWidget: okayButton) (qt subLayout addWidget: sickButton) (qt mainLayout setLayout: subLayout) ;; Here we add the sub layout to the main layout.
Overview
The addWidget adds a RadWidget control to the current RadVBoxLayout object. As controls are added to the RadVBoxLayout, they are automatically positioned in asthetic proportion to each other.
Syntax
(qt RadVBoxLayoutPtr addWidget: RadWidgetPtr)
Arguments
RadWidgetPtr | The RadWidget to be added to the current RadVBoxLayout object. |
Returns | Always returns a #void value. |
Example1
;; Build a dialog window with an Okay button and a Sick button. (setq mainLayout (qt new: RadVBoxLayout:)) ;; Here we create the main vertical layout control. (qt mainLayout addWidget: okayButton) ;; Here we add the Okay button to the main layout (qt mainLayout addWidget: sickButton) ;; Here we add the Sick button to the main layout
Overview
The delete function destroys a RadVBoxLayout object and returns a null pointer.
Syntax
(qt delete: RadVBoxLayoutPtr)
Arguments
RadVBoxLayoutPtr | The pointer to the RadVBoxLayout object to be destroyed. |
Returns | Always returns a null pointer. |
Example1
(setq RadVBoxLayoutPtr (qt new: RadVBoxLayout:)) ;; Create a RadVBoxLayout object. (setq RadVBoxLayoutPtr (qt delete: RadVBoxLayoutPtr)) ;; Destroy the RadVBoxLayout object.
Overview
The setStretchFactor set the stretch factor for the specified RadWidget control already added to the RadVBoxLayout object. As controls are added to the RadVBoxLayout, they are automatically positioned in asthetic proportion to each other. Setting the stretch factor for a RadWidget helps control the amount of space the control takes up relative to other controls added.
Syntax
(qt RadVBoxLayoutPtr setStretchFactor: RadWidgetPtr factor)
Arguments
RadWidgetPtr | The RadWidget to stretched in the current RadVBoxLayout object. |
factor | The amount to stretch the specified RadWidget control in the current RadVBoxLayout object. |
Returns | Always returns a #void value. |
Example1
;; Build a dialog window with an Okay button and a Sick button. (setq mainLayout (qt new: RadVBoxLayout:)) ;; Here we create the main vertical layout control. (qt mainLayout addWidget: okayButton) ;; Here we add the Okay button to the main layout (qt mainLayout addWidget: sickButton) ;; Here we add the Sick button to the main layout (qt mainLayout setStretchFactor: sickButton 2) ;; Here we give the Sick button more space