ctrlClassName: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
(Tweak example)
Line 18: Line 18:




|x1= List class names of all controls present on display 46:<code>_ctrls = "";
|x1= List class names of all controls present on display 46:<code>_return = [] ;
[[for]] "_i" [[from]] -1 [[to]] 10000 [[do]] {
{
[[with]] [[uiNamespace]] [[do]] {
_return [[pushBack]] [[format]] ["IDC: %1, className: %2", [[ctrlIDC]] _x, [[ctrlClassName]] _x];
_ctrl = [[findDisplay]] 46 [[displayCtrl]] _i;
} [[forEach]] ([[allControls]] ([[findDisplay]] 46));
[[if]] (![[isNull]] _ctrl) [[then]] {
[[copyToClipboard]] (_return [[joinString]] [[endl]]);</code>|EXAMPLE1=
_ctrls = _ctrls + [[format]] ["IDC: %1, Class Name: %2\n", _i, [[ctrlClassName]] _ctrl];
};
};
};
[[hint]] _ctrls;</code>|EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 11:52, 26 February 2020

Hover & click on the images for description

Description

Description:
Returns the class name of a Control as it is defined in config. If you need config class of a game created Display, it is stored on display itself: _className = findDisplay 12 getVariable ["BIS_fnc_initDisplay_configClass", ""]; // "RscDiary"
Groups:
Uncategorised

Syntax

Syntax:
ctrlClassName control
Parameters:
control : Control
Return Value:
String - class name

Examples

Example 1:
List class names of all controls present on display 46:_return = [] ; { _return pushBack format ["IDC: %1, className: %2", ctrlIDC _x, ctrlClassName _x]; } forEach (allControls (findDisplay 46)); copyToClipboard (_return joinString endl);

Additional Information

See also:
ctrlIDCctrlIDDctrlTypectrlCreatectrlDeletectrlModelctrlSetModelctrlPositionctrlSetPositionctrlModelScalectrlSetModelScalectrlModelDirAndUpctrlSetModelDirAndUp

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section