A quick question, but how do you modify properties that are within a panel? Say, I have a Panel in the Dialog, but I put a Label in the Panel. I want this Label to change to whatever value outside the Dialog settings.
The current format for changing dialog properties is as follow:
SetDialogProperty>Dialog Name,Object Name, Property Name, Value
It's the Object Name that I am stumped at. When I put Panel1, the Label's text didn't change. Putting Label1 didn't change the text in the Panel either. I tried Panel1.Label1, but it didn't have much of an effect.
How should I change properties that are nested within a Panel?
Thanks for reading.
Get/Set Properties in Dialog Panels
Moderators: JRL, Dorian (MJT support)
@ winstein,
Labels can be problematic when trying to change their text. I don't know if this has improved in newer versions, but I am using version 12.
I usually have more than one label in the same spot. I make one visible and the other not. Then I use the sdp to switch which one is visible
SetDialogProperty>DIalog1,Label1,Visible,False
SetDialogProperty>Dialog1,Label2,Visible,True
Sometimes I'll use an Edit box. I just remove the border and color it the same as the window it's in. This way I only need the one, and changing the text is easily done using sdp>.
Hope this helps you.
PepsiHog
Labels can be problematic when trying to change their text. I don't know if this has improved in newer versions, but I am using version 12.
I usually have more than one label in the same spot. I make one visible and the other not. Then I use the sdp to switch which one is visible
SetDialogProperty>DIalog1,Label1,Visible,False
SetDialogProperty>Dialog1,Label2,Visible,True
Sometimes I'll use an Edit box. I just remove the border and color it the same as the window it's in. This way I only need the one, and changing the text is easily done using sdp>.
Hope this helps you.
PepsiHog
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
@PepsiHog,
I've never had a problem dynamically changing labels in any version of Macro Scheduler, I started with version 6. Its particularly pain free starting with version 12. All you need to do is use the SetDialogProperties> function to alter the label object's "Caption".
SetDialogProperty>DIalog1,Label1,Caption,This is the new text displayed in Dialog1
@Winstein,
Every object in a dialog has a unique name. It doesn't matter whether that object is displayed in the primary client area of the dialog or in a panel or in a tabpage. The name of the object is unique and its properties can be altered using
SetDialogProperties>Dialog name,object name,property name,change
I've never had a problem dynamically changing labels in any version of Macro Scheduler, I started with version 6. Its particularly pain free starting with version 12. All you need to do is use the SetDialogProperties> function to alter the label object's "Caption".
SetDialogProperty>DIalog1,Label1,Caption,This is the new text displayed in Dialog1
@Winstein,
Every object in a dialog has a unique name. It doesn't matter whether that object is displayed in the primary client area of the dialog or in a panel or in a tabpage. The name of the object is unique and its properties can be altered using
SetDialogProperties>Dialog name,object name,property name,change
After some testing on this, you are right in that I need to use the Caption property instead of the Text property, since that is what will dynamically change the text.JRL wrote:@Winstein,
Every object in a dialog has a unique name. It doesn't matter whether that object is displayed in the primary client area of the dialog or in a panel or in a tabpage. The name of the object is unique and its properties can be altered using
SetDialogProperties>Dialog name,object name,property name,change
In that case, the problem is solved.
PPQ
Maybe at the time I also was trying to set the Text property. I'll check it out the next time it comes up in a macro of mine.
Thanks JRL.
PepsiHog
Thanks JRL.
PepsiHog
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!