Hi,
I have a grid with different unbound columns, where I set background images for demonstrating a process step for the particular row.
No I want to highlight the active row. So when I set the Override.ActiveAppearance to "enabled" my row has its highlight from the stylefile.This works fine, but my problem is, that the format of my images in the cells gets distroyed. See in the below Screenshot:
Any ideas how to prevent this behavior?
Thanks in advance
Alex
That's it!
Thanks.
I tried this out with your original sample and it doesn't seem to have anything to do with the AppStyling. If I comment out the call to StyleManger.Load, it still happens (although the button looks slightly different since Themes are on).
I think the problem is that you have assigned the image to the cell's Appearance and not the ButtonAppearance. In fact, your code assigns both a CellAppearance and a CellButtonAppearance to the column, but only the CellAppearance includes the image background.
Hi Mike,
Now I have another problem concerning this matter. I told you that the problem with the images getting destroyed is solved now. But now I have a similar problem with the grid cell button.
I am using an ultragrid where I put some background images to several cells. I also use the claymation style file from the style library.
I have the problem, that when I hover with my mouse over the cell button, my background images disappear. In designer there is no property to set this, so I tried to figure out which role or property this might be in the style file. But in the app stylist I cannot find some hot track properties for the Grid cell button.
In my attached images you can see that when I hover over the cell button the green image disappears.
The second image shows where I searched for the properties of grid cell button in app stylist.
Do you have any other idea to disable this hot track appearance?
That's it! Now it works as expected.
Thanks a lot!
linksaussen said:But I found out, that every change in my grid is overwritten by the style file. Because when I set the backgroundcolor of the active cell and row to e.g. red, it remains in this grey from the style file.
There's nothing strange about that at all. The Application Style Library is supposed to override any settings in the application. It would not be very useful for any existing application, otherwise.
Anyway, I'm sorry I did not notice that you attached a sample yesterday. I took a look at your sample today and I am getting the same behavior you are.What I typically do in cases like this where I know the Style Library is causing an effect I don't want, is to use the AppStylistRuntime component to style the app at run-time. This was I can see what roles affect the object in question and I can reset those roles one at a time to see which one is causing the problem.
In this case, the behavior is caused by the GridRow UIRole, and in particular, it's Active state.
This role has a Resource applied to it: "gridRowClaymation_Active". So I looked at the xml in the isl file and I can see that this resource has set it's ImageBackgroungStretchMargins. It's specifically altering the background image.
<resource name="gridRowClaymation_Active" backColor="White" imageBackgroundStyle="Stretched" fontBold="True" backColor2="DarkGray" backGradientStyle="Vertical" imageBackgroundStretchMargins="0, 16, 0, 3" />
You cannot see this from within AppStylist, since there is no background image actually applied to the resource.So what you can do is:
Or... if you prefer, you could modify the isl file directly in Notepad and remove the:
imageBackgroundStretchMargins="0, 16, 0, 3"