GetControlAttr Dialog Box Command

Gets the {...} .

data = GetControlAttr (reqh, ctrlid, attr)


Parameters:


Results:


Notes:


See Also:
AlertRequester, AppendListString, CloseResource, CreateLanguageEngineList, CreateList, CreateRequester, DoLanguageEngineFormatDate, DoLanguageEngineLocalizeString, DoRequester, FreeLanguageEngineList, FreeList, FreeRequester, GetCmdStringFromCoord, GetCoordFromString, GetFolderPath, GetResourceString, GetUIStringFromCoord, OpenResource, PrependListString, SetControlAttr, SortList

Examples:
Additional example in ''RequesterExample.py''.
Python:


ARexx:

Applescript:

 

GetControlAttr  Command Definition  url:PGScmd/getcontrolattr
  created:2006-05-04 17:25:37   last updated:2006-09-14 09:45:52
  Copyright © 1985-2024 GrasshopperLLC. All Rights Reserved.

User Contributed Comments For GetControlAttr
Tim Doty wrote...2006-05-27 10:07:05

GetControlAttr <requester> <control index> <type>

<requester> this is the handle returned when opening the requester
<control index> the index of the control as specified in the rsc file
<type> ControlAttr_String, ControlAttr_Number, ControlAttr_State, ControlAttr_Current

String is general purpose
State is for checkbox (0 == unselected; 1 == selected)
Number is for integers
Current is for lists and popup menus (number is entry in list, if you want the list item text use String)

Python:


width = float(GetControlAttr(reqH, 11, ControlAttr_String)['.result'])

Tim Doty wrote...2008-05-20 20:13:48

Theoretically supports ControlAttr_SelectionArray to retrieve multiple selections though this may not work up to 5.0.4.18 at the least.

Tim Doty wrote...2011-01-18 08:40:18

The following would appear to be valid attribute types as of 5.0.5.8:

ControlAttr_String
ControlAttr_List
ControlAttr_Current
ControlAttr_SelectionArray
ControlAttr_StringArray
ControlAttr_Min
ControlAttr_Max
ControlAttr_State
ControlAttr_MixedState
ControlAttr_NumChars
ControlAttr_Number


User Contributed Comments For GetControlAttr