Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Problem with mbColorLib (https://www.delphipraxis.net/166305-problem-mbcolorlib.html)

WojTec 7. Feb 2012 14:15

Delphi-Version: 2010

Problem with mbColorLib
 
I'm trying make simple visual RGB selector (with trackbars only). For this I'm using mbColorLib. This is what I have:

Delphi-Quellcode:
procedure TForm2.BColorPicker1Change(Sender: TObject);
begin
  if FUpdate then Exit;

  FUpdate := True;
  try
    RColorPicker1.Blue := BColorPicker1.Blue;
    GColorPicker1.Blue := BColorPicker1.Blue;

    mbColorPreview1.Color := BColorPicker1.SelectedColor;
  finally
    FUpdate := False;
  end;
end;

procedure TForm2.GColorPicker1Change(Sender: TObject);
begin
  if FUpdate then Exit;

  FUpdate := True;
  try
    RColorPicker1.Green := GColorPicker1.Green;
    BColorPicker1.Green := GColorPicker1.Green;

    mbColorPreview1.Color := GColorPicker1.SelectedColor;
  finally
    FUpdate := False;
  end;
end;

procedure TForm2.RColorPicker1Change(Sender: TObject);
begin
  if FUpdate then Exit;

  FUpdate := True;
  try
    GColorPicker1.Red := RColorPicker1.Red;
    BColorPicker1.Red := RColorPicker1.Red;

    mbColorPreview1.Color := RColorPicker1.SelectedColor;
  finally
    FUpdate := False;
  end;
end;
Just simple assigning values, but after F9 raises AV. Could you try it in your mbColorLib, please?


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:20 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz