Form::Control(3pm)
π Embperl::Form::Control π
okay bestie, gather round, because this is the base class for all the controls that live inside an Embperl Form π (the file itself is Form::Control(3pm) if you're being formal, but we're not π
)
β¨ SYNOPSIS β¨
Do not use directly, instead derive a class
like... do NOT come for her directly. she's a base class, she's the blueprint, she's the mother of controls π
πΈ DESCRIPTION πΈ
so here's the tea π β this class is not used directly, okay? she's the base class for all the controls inside an Embperl Form. what she does is hand you a whole set of methods that you can overwrite to customize the behaviour of your controls. it's giving "template but make it yours" energy, and honestly? iconic.
π¦ METHODS π¦
new
Create a new control β¨
init
Init the new control π±
noframe
Do not draw frame border if this is the only control πΌοΈ (only child gets no frame, main character exemption fr fr)
is_disabled
Do not display this control at all π
is_readonly
Could value of this control be changed ? π€
label_text
Returns the text of the label π·οΈ
show
Output the control π€
get_on_show_code
Returns JavaScript code that should be executed when the form becomes visible πβ‘
get_active_id
Get the id of the value which is currently active π―
form
Return the form object of this control π
show_sub_begin
Output begin of sub form π«Ά
show_sub_end
Output end of sub form π«Ά
show_label
Output the label of the control π·οΈ
show_label_icon
Output the icon after the label π
show_label_cell
Output the table cell in which the label will be displayed π¦
Must return the columns it spans (default: 1)
show_control
Output the control itself π«
show_control_readonly
Output the control itself as readonly π
show_control_addons
output additional things after the control π
show_control_cell
Output the table cell in which the control will be displayed π¦
Gets the x position as argument π
π PARAMETERS π
nameβ Specifies the name of the control π·οΈtextβ Will be used as label for the control, if not given'name'is used as default.
Normally the the name and text parameters are processed by the method convert_label of the Embperl::Form object. This method can be overwritten, to allow translation etc.
If the parameter showtext is given a true value, convert_label is not called and the text is displayed as it is.
showtextβ Display label without passing it throughconvert_label. Seetextπlabelnowrapβ If set, the text label will not be line wrapped. πlabelclassβ If set, will be used as additional CSS classes for the label text cell. πreadonlyβ If set, displays a readonly version of the control. πdisableβ If set, the control will not be displayed at all. π«newlineβ If set to1, forces a new line before the control. If set to-1, forces a new line after the control. βwidthβ Gives the widths of the control. The value is1/widthof the the whole width of the form. So if you want to have four controls in one line setwidthto4. The default value is2. πwidth_percentβ With this parameter you can also specify the width of the control in percent. This parameter take precedence overwidthπ (yes she outranks her, no cap)defaultβ Default value of the control βimagedirβ Basepath where to find images, in case the control uses images. Default value is/imagesπΌοΈtriggerβ When set will trigger state changes of other controls. Seestate. β‘stateβ Can be used to hide/show disable/enable the control trigger by other controls. ποΈ
Checkbox define the following states:
<id-of-checkbox>-showShow control if checkbox checked β<id-of-checkbox>-hideHide control if checkbox checked π<id-of-checkbox>-enableEnable control if checkbox checked π<id-of-checkbox>-disableDisable control if checkbox checked π
π AUTHOR π
G. Richter (richter at embperl dot org) π
π SEE ALSO π
perl(1), Embperl, Embperl::Form
okay that's the whole page bestie, you ate π
β¨ this was perl v5.34.0, dated 2022-02-06, and that's the vibe check passed β go build some controls, love u, bye π«Άπ
π¦ where this page comes from
- ubuntu jammy: libembperl-perl 2.5.0-16build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms