- This topic has 12 replies, 4 voices, and was last updated 13 years, 10 months ago by
Hamilton.
-
AuthorPosts
-
August 18, 2011 at 1:21 pm #46431
I really like the API and controls and am considering buying it but I need to know if there is a workaround to my problem first.
Any help at all would be great?
August 19, 2011 at 6:34 am #46438Hello
Unfortunately it's not possible at moment, I haven't a big experience in using of DevEx components.
August 20, 2011 at 3:04 am #46466Is there any method or code example you could suggest to control the hueoffset or general colour for a control or canvas without affecting the rest of the application?
August 20, 2011 at 6:56 am #46467Hello
You can change HUE or Saturation of color using these functions :
function ChangeHue(Delta : integer; Color : TColor) : TColor;
function ChangeSaturation(Color : TColor; Delta : integer) : TColor;
These functions are declared in the sGraphUtils.pas
August 20, 2011 at 7:09 am #46468How do you use them exactly? Can you provide an example?
August 20, 2011 at 7:16 am #46469These functions are for receiving of custom Color with changed HUE or Saturation.
Received color you can use in custom controls or elements where it's possible…
April 20, 2012 at 2:29 pm #48291Here's a simple solution:
a) Into aclfPainter.pas replace the procedure DrawProgressBarChunk
procedure TcxACLookAndFeelPainter.DrawProgressBarChunk(ACanvas: TcxCanvas; ARect: TRect; AVertical: Boolean);
var
i : integer;
TmpBmp, BGBmp : TBitmap;
begin
if Skinned then begin
if AVertical then
i := DefaultManager.GetSkinIndex(s_ProgressV)
else
i := DefaultManager.GetSkinIndex(s_ProgressH);
if DefaultManager.IsValidSkinIndex(i) then
begin
TmpBmp := CreateBmp32(WidthOf(ARect), HeightOf(ARect));
BGBmp := CreateBmp32(WidthOf(ARect), HeightOf(ARect));
BitBlt(BgBmp.Canvas.Handle, 0, 0, TmpBmp.Width, TmpBmp.Height, ACanvas.Handle, ARect.Left, ARect.Top, SRCCOPY);
PaintItem(i, s_Button, MakeCacheInfo(BgBmp), True, 0, Rect(0, 0, TmpBmp.Width, TmpBmp.Height), Point(0, 0), TmpBmp, DefaultManager);
if DefaultManager.Tag>0 then
sGraphUtils.ChangeBmpHUE(TmpBmp, DefaultManager.Tag);
BitBlt(ACanvas.Handle, ARect.Left, ARect.Top, TmpBmp.Width, TmpBmp.Height, TmpBmp.Canvas.Handle, 0, 0, SRCCOPY);
DefaultManager.Tag:=0;
FreeAndNil(TmpBmp);
FreeAndNil(BgBmp);
end;
end else inherited
// Old Flat style //
// if Skinned then ACanvas.FillRect(ARect, MixColors(DefaultManager.GetActiveEditFontColor, DefaultManager.GetActiveEditColor, 0.5)) else inherited;
end;
😎 The column you want an diferent color, ondraw set tag of skinmanager with Hue value
procedure TForm1.cxGrid1TableView1Column1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
var ADone: Boolean);
begin
DataModule2.sSkinManager1.Tag := 250;
end;
and that's it.
Hope this help you.
April 20, 2012 at 4:34 pm #48296well,
may be wath you want is this (look at the last column of attached sample)
It's WORKING
April 21, 2012 at 4:11 am #48298That last image is exactly what I want! Thanks!
The zipped attachments don't appear to be valid however, can you post them again please?
April 26, 2012 at 3:54 am #48307Could you attach another code example that produced the attached image?
The zip files will not open when downloaded.
Thanks.
April 27, 2012 at 2:29 pm #48309I've downloaded the file and is opening..
Could you try again please.
May 1, 2012 at 3:57 am #48311It appears the attachment is a 7-zip (7z) file rather than a zip but has the wrong extension. If you google 7-zip you'll find the free program that will allow you to extract the project.
-
AuthorPosts
- You must be logged in to reply to this topic.