Hi,
We are using Infragistics in our Application. Now we have multiple UltraLabels in our application i.e Infragistics.Win.Misc.Ultralabel. These labels have some Background color which is of certain significance. I want to know the Background Color which each Ultralabel represents. I have googled and gone through the forum, but could not find anything much of significance.
I can't upload the screenshot as it is against company policies.
How can i achieve this?
How to get Color Property of UltraLabel
-
- Posts: 9
- Joined: Tue Jun 14, 2016 3:26 pm
Re: How to get Color Property of UltraLabel
Hi,
Now this is definitely something you will have to do via InvokeRemotely, as described here:
http://www.ranorex.com/forum/finding-th ... html#p3622
Now this is definitely something you will have to do via InvokeRemotely, as described here:
http://www.ranorex.com/forum/finding-th ... html#p3622
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 9
- Joined: Tue Jun 14, 2016 3:26 pm
Re: How to get Color Property of UltraLabel
Hi,
It did not work for me. I got the following error.
Action 'invokeremotely' failed on element '{Unknown:ultraPanel2}'.
Object reference not set to an instance of an object.
here is my code ->
It did not work for me. I got the following error.
Action 'invokeremotely' failed on element '{Unknown:ultraPanel2}'.
Object reference not set to an instance of an object.
here is my code ->
Code: Select all
Ranorex.Control elementUltraGrid1 = new Ranorex.Control("/form[@controlname='PranaMain']/element[@controlname='ultraPanel2']");
bool backColor = (bool)elementUltraGrid1.InvokeRemotely(
delegate(System.Windows.Forms.Control control, object input){
Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid = (control as Infragistics.Win.UltraWinGrid.UltraGrid);
Report.Info(ultraGrid.ActiveCell.Appearance.BackColor.ToString());
return true;
});
Re: How to get Color Property of UltraLabel
Hi,
In your firts post, you mentioned you are using Infragistics.Win.Misc.Ultralabel but in your code you are using Infragistics.Win.UltraWinGrid.UltraGrid ? My guess is that this is the cause of the error? But as I mentioned, I've never used InvokeRemotely before
In your firts post, you mentioned you are using Infragistics.Win.Misc.Ultralabel but in your code you are using Infragistics.Win.UltraWinGrid.UltraGrid ? My guess is that this is the cause of the error? But as I mentioned, I've never used InvokeRemotely before
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration