B
Bazilby
Guest
A client needs the application to have colour inserted into the application for specific instances, so the fields will only be populated with colour when necessary, I'm doing this with a right-click context menu.
I created an example application that uses this code and pulls the widget names from a JSON file.
This worked perfectly fine in my example application, but once I try implement it in the main application it can't see the specific widgets because it is looping through the topmost parent container and going no further.
Is there a way to get to the elements that are contained within?
Continue reading...
I created an example application that uses this code and pulls the widget names from a JSON file.
Code:
DEFINE VARIABLE hHandle AS HANDLE NO-UNDO.
DEFINE VARIABLE widgetName AS CHARACTER NO-UNDO.
DEFINE VARIABLE colourNumber AS INTEGER NO-UNDO.
FOR EACH Resultst-WidgetList:
ASSIGN
widgetName = Results-WidgetList.tt-widName /* these assignments are just getting the info */
colourNumber = INT(Results-WidgetList.tt-colour
.
hHandle = SESSION:FIRST-CHILD.
DO WHILE VALID-HANDLE(hHandle):
IF hHandle:TYPE = "FIELD-GROUP" THEN LEAVE.
hHandle = hHandle:FIRST-CHILD.
END.
hHandle = hHandle:FIRST-CHILD.
DO WHILE VALID-HANDLE(hHandle):
IF hHandle:TYPE = "FILL-IN" AND hHandle:NAME = widgetName THEN LEAVE.
hHandle = hHandle:NEXT-SIBLING.
END.
ASSIGN
hHandle:BGCOLOR = colourNumber.
END.
This worked perfectly fine in my example application, but once I try implement it in the main application it can't see the specific widgets because it is looping through the topmost parent container and going no further.
Is there a way to get to the elements that are contained within?
Continue reading...