Is there a way to find out alignment of labels? : Automation API

Is there a way to find out alignment of labels?

Class library usage, coding and language questions.

Is there a way to find out alignment of labels?

Postby artur_gadomski » Thu Jul 29, 2010 2:31 pm

Hi
I looked around and could not find it but maybe I've been looking in wrong place. Is there a way to get an alignment of text in a static text control?
I want to test a layout of windows with a bunch of labels. I tested alignment of ScreenRectangles of each text box but text inside might be aligned to the left or right or middle.
User avatar
artur_gadomski
 
Posts: 24
Joined: Mon Jul 19, 2010 7:55 am

Re: Is there a way to find out alignment of labels?

Postby Support Team » Thu Jul 29, 2010 3:29 pm

Hi,

Sorry but such property is not available at the moment. You can use the image based automation to validate if the text has the correct alignment. Please take a look to following documentation
http://www.ranorex.com/support/user-gui ... ation.html

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 2006
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Is there a way to find out alignment of labels?

Postby artur_gadomski » Fri Jul 30, 2010 7:47 am

That's not really an option for me since I'm dealing with 200+ different windows each of them having 5-20 text labels that often don't repeat between windows.
User avatar
artur_gadomski
 
Posts: 24
Joined: Mon Jul 19, 2010 7:55 am

Re: Is there a way to find out alignment of labels?

Postby Support Team » Fri Jul 30, 2010 12:48 pm

Hi,

There is another solution for WinForms, but this is solely for WinForms and the element must have the adapter control. For example for a Label
Ranorex.Text yourItem= "PathToElement";
Ranorex.Control cont = new Ranorex.Control(yourItem);
cont.GetPropertyValue("TextAlign");

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 2006
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests

cron