- This topic has 19 replies, 3 voices, and was last updated 13 years, 1 month ago by Hamilton.
-
AuthorPosts
-
September 9, 2011 at 6:06 am #34770HamiltonParticipant
I don't know if you could truly describe this as an issue but I'll throw it out there..
In my app I use DevExpress grids and want to enable themed row bands and selection highlight. There is no automated way of doing this (that I'm aware of) so what I am doing is taking the skin manager global and highlight color and font color and applying those to the grid manually. This works fine for the other skins I'm using but for Moonlight I end up with the same colour for the alternate row as I have for the selection. It seems strange that the highlight would ever be the same as the global settings and I wonder if this part of the skin is setup properly.
The code I'm using to get the colors is as follows:
sSkinManager1.GetGlobalColor;
sSkinManager1.GetGlobalFontColor;
sSkinManager1.GetHighLightColor(False);
sSkinManager1.GetHighLightFontColor(False);
I don't want to manually edit my skin here as it breaks forward compatibility with other changes that might occur and I cannot update the skin every 2 weeks when a new version of AlphaControls becomes available so what I'd really appreciate is either a change in the skin provided (if that won't break things) or suggestions on how I might better implement my banded and selection row colours.
TIA.
September 16, 2011 at 6:39 am #46672SupportKeymasterI'm sorry, I not quite understand a problem. You have received wrong colors?
September 16, 2011 at 1:59 pm #46678HeDiBoParticipant'Support' wrote:I'm sorry, I not quite understand a problem. You have received wrong colors?
I think the complaint is that in the Moonlight skin the colors for Highlight and for Global appear to be the same.
September 16, 2011 at 2:11 pm #46679SupportKeymasterThis skin is updated now : http://www.alphaskins.com/sfiles/skins/moonlight.asz
September 21, 2011 at 7:32 am #46731HamiltonParticipantHi Serge,
I'm sorry but I've given you some wrong information in my previous post, sorry I had some incorrect comments against the code for the grid and I had didn't realize it didn't worked as documented, and as a consequence your fix doesn't do what I want it to do.. Apologies, allow me to explain what I meant to say..
1) My #1 preference would be if the AC skinning of cxGrids from DevExpress included supplying the color for the banded rows. In the grid, this involves setting the DBGridListView.Styles.ContentOdd property. Currently the skinning of the grid does successfully skin the title bar and selected row (see below), and perhaps some other properties as well.
2) The AC skinning of cxGrids sets the color of the highlighted row but not the banded rows. I'm currently coding around this manually by including a cxStyleRepository in my project and setting the colors the selected row as follows:
cxStyle4 .Color := sSkinManager1.GetHighLightColor(False);
cxStyle4 .Font.Color := sSkinManager1.GetHighLightFontColor(False);
The other code I included that uses GetGlobalColor is *wrong*, I'm actually using the GlobalColor to show the selected row when the grid doesn't have focus, which isn't relevant to this post..
Anyway with all of the other themes I'm using in my project (including BlueGlass, Golden, iOS4, NextAlpha, Office2010 Blue, Opus and Web) the color of the selected row is different to the value returned by GetHighlightColor and thus I end up with a nicely banded grid with a distinct color for the selected row. With Moonlight, GetHighlightColor returns the same color as is used by the grid for the selected row, and you can't always see what row is selected.
TLDR: For the moonlight theme, GetHighLightColor returns the same color as the cxGrid uses for the selected row. All other themes that I've tested don't work like this. Any chance this could be changed? Or better yet, implement skinning of cxGrids at a lower level so I don't have to do it manually 😛
TIA and apologies once more for the incorrect info posted in the OP.
September 21, 2011 at 8:09 am #46736HamiltonParticipantScreenshot attached.
October 4, 2011 at 10:02 am #46782SupportKeymasterHello
As I understand – you want to have odd and even colors? But cxGrid uses them automatically, special defining of such colors is not needed.
Quote:For the moonlight theme, GetHighLightColor returns the same color as the cxGrid uses for the selected row.I think, you can receive combinations of colors by using MixColors function, example :
Code:function TcxACLookAndFeelPainter.DefaultVGridLineColor: TColor;
begin
if Skinned then Result := MixColors(DefaultManager.GetActiveEditFontColor, DefaultManager.GetActiveEditColor, 0.3) else Result := inherited DefaultVGridLineColor;
end;function TcxACLookAndFeelPainter.DefaultVGridBandLineColor: TColor;
begin
if Skinned then Result := MixColors(DefaultManager.GetActiveEditFontColor, DefaultManager.GetActiveEditColor, 0.3) else Result := inherited DefaultVGridBandLineColor;
end;October 5, 2011 at 1:30 am #46795HamiltonParticipantEDIT: Thx Serge looking at this now.
October 5, 2011 at 5:12 am #46796HamiltonParticipantHi Serge,
I've worked this out now. The code to set the banding may have been introduced before the component supported this or may have just been an oversight. What complicated the investigation is that the default theme for the app is WEB and for that skin the banding doesn't show as the two colours are too close. If you look *very* closely at the screen shot on my previous post the grid that doesn't look like it has a band is using the WEB skin; it actually does have a band it is just extremely faint. Perhaps an update to the WEB skin could improve this.
Thanks for the help.
Regards,
Hamilton
October 5, 2011 at 6:41 am #46799SupportKeymasterCan you send me this test-application? I will check a skin with this program after changing.
October 7, 2011 at 2:49 am #46840HamiltonParticipantHi Serge,
Please find the test program attached. After extracting the contents from the zip you'll just need to enter your skin path then you should be good to go. I've put the current BlueGlass and WEB skins in the default folder as placeholders.
Cheers,
Hamilton
October 12, 2011 at 6:56 am #46857SupportKeymasterThank you, please try version 7.52
October 12, 2011 at 8:05 am #46863HamiltonParticipantHi Serge,
My initial impression was that the banding is subtle but distinct; however after using the grid for longer I think if there is a lot of data then the banding is too subtle. The attached image compares the same grid with Office2010Blue and WEB themes. To my eye, in the column with the “Test2” values you can see the banding fairly well for both skins but if you have a grid that contains more data like the final column then you cannot see the rows at all. IMO the banding should be a few shades darker. What do you think?
Regards,
Hamilton
October 18, 2011 at 8:16 am #46925SupportKeymasterLook what I have with your demo.
Why we have different colors?
October 18, 2011 at 8:44 am #46929HamiltonParticipantHi Serge,
I tried the test app here on 3 PC's using the latest skins from AC 7.53 and the banding is not as pronounced on any of them as it is on your screen shots. The attached images show
1. How the Office2010 Blue and WEB skins look on my PC.
2. How the WEB skin looks on my PC with your screen shot in the background.
The second image is the interesting one – it really highlights how different what I'm seeing is based on what you've produced, and it rules out the vagaries of monitor colors I think because on my monitor I can see the bands in your screen shot quite clearly. It's as if the skin in the distributable is different to what you're using internally but I'm sure you would have checked that so I'm not sure what else it could be.
Regards,
Hamilton
October 18, 2011 at 8:51 am #46932SupportKeymasterWhich version of the cxGrid do you uses?
October 18, 2011 at 9:03 am #46933HamiltonParticipantDevExpress 6.57, Delphi 2010 with all updates. I plan to update to the latest version of DevExpress when they have fixed the compatibility problems with XE2.
Unless you recompiled the code I provided for the test app we should be able to exclude these versions as variables? And if you did recompile would you consider running the .exe I supplied and let me know if the colors are the same?
October 18, 2011 at 9:06 am #46934SupportKeymasterSo, you uses an old acLFPainter6.pas file?
Try this updated unit in your application.
October 19, 2011 at 1:51 am #46952HamiltonParticipantCheers Serge that fixes the problem. The changes to the “DefaultContentOddColor” method do make the bands more distinct with the WEB skin as well as several others I had noticed had faint bands before. I also had a quick look through all the skins and I can't see that the change has 'broken' anything so this seems good to include in the next release. Thanks again.
Regards,
Hamilton
October 21, 2011 at 2:02 am #46981HamiltonParticipantThe updated code has been released in v7.54; it looks good so I'll close this issue.
-
AuthorPosts
- You must be logged in to reply to this topic.