Here is a snippet of the code I have that works. The button gadget caption is first assigned a text string that resides (or not) in an array.
Code: Select all
SetGadgetText(#Gadget_Launch_VNC_Form1_Button_Row1_Col1, Array$(1,1,1)) ;array row (city), column(node name), IP address
If Len(Array$(1,1,1)) < 3 ;no data in array element = no button assignment
HideGadget(#Gadget_Launch_VNC_Form1_Button_Row1_Col1,1) ;hide button
EndIf
I have tried to find a way to use variables for the gadget row and column name so I don't have to duplicate the example 4 lines of code 84 times and use a simple for next loop to scan through the array and hide the buttons that are not assigned with a node name and ip address.
Does anyone have any suggestions as to how I can minimize the lines of code needed to accomplish the task of first setting the button gadget caption and then hiding the buttons that have no caption text?
Any help is appreciated.
Thank you,
Stephen