Search found 6 matches

by winniethedragon
Thu Jun 04, 2015 6:20 pm
Forum: Automation API
Topic: How to get text color from text in WPF cell?
Replies: 8
Views: 4214

Re: How to get text color from text in WPF cell?

It looks like my license does not let me use Ranorex 5.3.2...
Any other way I can get access to the color attribute? Thanks!
by winniethedragon
Mon Jun 01, 2015 7:47 pm
Forum: Automation API
Topic: How to get text color from text in WPF cell?
Replies: 8
Views: 4214

Re: How to get text color from text in WPF cell?

Hello Markus, Thank you for your reply! However, I am getting this error now using the "ForegrounColor" attribute... ==>var color = PepCellText.Element.GetAttributeValue("ForegroundColor"); System.NullReferenceException: Object reference not set to an instance of an object. This is the exact same pr...
by winniethedragon
Wed May 27, 2015 10:07 pm
Forum: Automation API
Topic: BackColor Attribute?
Replies: 18
Views: 8132

Re: BackColor Attribute?

I am getting the same "Object reference not set to an instance of an object." error...

Anyone resolves this?

Thanks!
Winnie
by winniethedragon
Wed May 27, 2015 9:35 pm
Forum: Automation API
Topic: How to get text color from text in WPF cell?
Replies: 8
Views: 4214

Re: How to get text color from text in WPF cell?

Okay, I finally got the Ranorex.Text working by doing this: Ranorex.Text PepCellText = PepCell.FindSingle<Ranorex.Text>(".//text"); But then the ColorAttribute is giving me an error: var color = PepCellText.Element.GetAttributeValue("ForeColor"); System.Reflection.TargetInvocationException: Exceptio...
by winniethedragon
Wed May 27, 2015 9:06 pm
Forum: Automation API
Topic: How to get text color from text in WPF cell?
Replies: 8
Views: 4214

Re: How to get text color from text in WPF cell?

It's strange, I did the following.... public string PeptideTableReadOnlyStatus() { string ToPrint = "***"; Ranorex.Table PepTable = repo.PeakView.PMControl.PeptidesTable; for (int i = 1; i < PepTable.Rows.Count; i++) { Ranorex.Row PepRow = PepTable.Rows.ElementAt(i); Ranorex.Cell PepCell = PepRow.Ce...
by winniethedragon
Wed May 27, 2015 9:39 am
Forum: Automation API
Topic: How to get text color from text in WPF cell?
Replies: 8
Views: 4214

How to get text color from text in WPF cell?

Hello, I am trying to get the text color in the table...but this code doesn't seem to work... Please help! I want to tell the difference between row 182 and 183... foreach (Ranorex.Row row in PepRows) { Ranorex.Cell cell = row.Cells.ElementAt(3); Ranorex.Text cellText = cell.Text.ToString(); var col...