Thema: Delphi Problem with mbColorLib

Einzelnen Beitrag anzeigen

WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

Problem with mbColorLib

  Alt 7. Feb 2012, 14:15
Delphi-Version: 2010
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?
  Mit Zitat antworten Zitat