First of all, I am using an isl file for general look and feel.
I have a blue color for selected row which I didn't really configure that way (make me believe it is Windows default). When a row is selected the font looks white. Now when I mouse over the row, the text in the row becomes invisible because mouse over row color is kind of whitish too. How can I make mouse over a different dark color, say brown, by setting in the isl file?
Also note that I am using ControlThenApplication for the Grid ResolutionOrder.
A quick response is very much appreciated.
Hi Steve,
Thank you for posting in our forums.
Where are you setting the mouse over background color? When you are setting it you can also set the forecolor. If you are setting it through AppStylist, you can find the option in the “Font” panel, if you are setting it through code you can use the ForeColor property of the Appearance object.
Let me know if you have any additional questions.
Dimitar,
Sorry I missed your response for 2 days. I was waiting for this.
Yes We were using AppStylist, but the question is why this is a problem because everything related to row highlighting is using default except I am setting Grid ResolutionOrder to "ControlThenApplication".
Also in Appstylist editor, you have "Normal", "Selected", "HotTracked" and "Active". Which one is for MouseOver?
I tried both HotTracked and Active and both don't have any effect.
-Steve
Thank you for the reply. I am glad that you have resolved this issue.
When the ResolutionOrder is set to ControlThenApplication, every setting in the UltraGrid will override its matching setting in AppStylist. This means that if you have HotTrackRowAppearance, it will override the settings you set on the GridRow for the HotTrack state. However in this case, the settings are the ActiveAppearance in the grid and the HotTrack appearance in AppStylist. There is no reason for the ActiveAppearance to override the HotTrack one and our controls can’t know if the setting has been left intentionally or not. If you want only the settings from the control to be applied, you should use “ControlOnly” ResolutionOrder.
I hope this makes things clear. Let me know if you have any additional questions.
Thanks Dimitar for your reply. At the end I had to delete this block under role="Row" for ANY override code to work:
<state name="HotTracked" backColor="Transparent" backGradientStyle="None" backHatchStyle="None">
<resources>
<name>GridRow_HotTracked</name>
</resources>
</state>
I think this whole ISL and override scheme is so complicated it's hard to make any sense.
Should greatly simplify ISL file structures and make override always "overwride" what's in ISL file.
Thank you for the reply.
Well, you must have set the highlighted color of the grid somewhere since the grid doesn’t have any highlighting by default. It is possible that if you are using an ISL file with predefined appearances, some of these appearance override the highlighted color of the grid and setting the ResolutionOrder of the grid to ControlThenApplication allows it to use default appearance for active rows (white foreground and highlight background). Since the ISL file has white color for the highlighted background the end result is "white on white".
There are several options here depending on what you want to do. You can turn off the ActiveAppearnce of the row. This way only the highlighting will appear. You can do this with the following line:
this.ultraGrid1.DisplayLayout.Override.ActiveAppearancesEnabled = DefaultableBoolean.False;
You can modify the highlighted backcolor in AppStylist, so that it doesn’t match the forecolor. The option that affects the MouseOver color is "HotTrack", but since the resolution of the cell appearance is somewhat complex operation and there are several places in AppStylist that may affect this, if you want to do this, I would suggest to simply send me the AppStylist and I will do it for you.
You can also try setting the highlight backcolor from code using the HotTrackCellAppearance or HotTrackRowAppearance:
this.ultraGrid1.DisplayLayout.Override.HotTrackCellAppearance.BackColor = myColor;
or:
this.ultraGrid1.DisplayLayout.Override.HotTrackRowAppearance.BackColor = myColor;
Please let me know if you have any additional questions.