How to check custom button's .Checked state?
Posted: Fri Sep 11, 2009 11:50 pm
Hello,
I created Repository (Ranorex 2.0.1) that contains bunch of buttons, labels, etc.
Some buttons are custom (inherited from System.Windows.Forms.Button) but they also have a "Checked" attribute. Basically it's a check type button that stays de-pressed when you select it.
For some reason I can't verify this state... When I type:
... I don't have the "Checked" option.
I remember that in previous version on Ranorex I could do something like that:
... but it doesn't work for me because Ranorex Button cannot be converted to Ranorex Control
Is there any way to add this custom feature to Repository? What's the solution, if any?
Thank you. I love Ranorex and this is the first time I actually ran into a problem in 2.0.1.
I created Repository (Ranorex 2.0.1) that contains bunch of buttons, labels, etc.
Some buttons are custom (inherited from System.Windows.Forms.Button) but they also have a "Checked" attribute. Basically it's a check type button that stays de-pressed when you select it.
For some reason I can't verify this state... When I type:
Code: Select all
Button1.
I remember that in previous version on Ranorex I could do something like that:
Code: Select all
Ranorex.Control c = (Ranorex.Control)repo.FormTest.Button1;
if (c.GetPropertyValue<bool>("Checked"))
selection = 1;
Is there any way to add this custom feature to Repository? What's the solution, if any?
Thank you. I love Ranorex and this is the first time I actually ran into a problem in 2.0.1.