ADD: pbExample for use inverted selection property

This commit is contained in:
b4rr4cuda 2008-06-18 02:21:59 +00:00
commit e2ffb7820d
2 changed files with 43 additions and 9 deletions

View file

@ -1122,6 +1122,7 @@ object frmOptions: TfrmOptions
Top = 214
Width = 200
Caption = 'Use Inverted Selection'
OnChange = cbbUseInvertedSelectionChange
TabOrder = 13
end
end

View file

@ -276,6 +276,7 @@ type
procedure btnOpenClick(Sender: TObject);
procedure btnForeColorClick(Sender: TObject);
procedure btnBackColorClick(Sender: TObject);
procedure cbbUseInvertedSelectionChange(Sender: TObject);
procedure cbCategoryColorChange(Sender: TObject);
procedure cbColorBoxChange(Sender: TObject);
procedure cbDateTimeFormatChange(Sender: TObject);
@ -586,6 +587,11 @@ begin
end;
end;
procedure TfrmOptions.cbbUseInvertedSelectionChange(Sender: TObject);
begin
pbExample.Repaint;
end;
procedure TfrmOptions.cbColorBoxChange(Sender: TObject);
begin
(Sender as TColorBox).Color := (Sender as TColorBox).Selected;
@ -952,15 +958,33 @@ begin
case I of
1:
begin
Brush.Color := cbBackColor.Color;
Font.Color := cbMarkColor.Color;
sText := 'Mark';
if cbbUseInvertedSelection.Checked then
begin
Brush.Color := cbMarkColor.Color;
Font.Color := cbTextColor.Color;
sText := 'Mark';
end
else
begin
Brush.Color := cbBackColor2.Color;
Font.Color := cbMarkColor.Color;
sText := 'Mark';
end;
end;
2:
begin
Brush.Color := cbBackColor2.Color;
Font.Color := cbMarkColor.Color;
sText := 'Mark';
if cbbUseInvertedSelection.Checked then
begin
Brush.Color := cbMarkColor.Color;
Font.Color := cbTextColor.Color;
sText := 'Mark';
end
else
begin
Brush.Color := cbBackColor2.Color;
Font.Color := cbMarkColor.Color;
sText := 'Mark';
end;
end;
3:
begin
@ -982,9 +1006,18 @@ begin
end;
6:
begin
Brush.Color := cbCursorColor.Color;
Font.Color := cbMarkColor.Color;
sText := 'Mark + Cursor';
if cbbUseInvertedSelection.Checked then
begin
Brush.Color := cbCursorColor.Color;
Font.Color :=InvertColor(cbCursorText.Color);
sText := 'Mark + Cursor';
end
else
begin
Brush.Color := cbCursorColor.Color;
Font.Color := cbMarkColor.Color;
sText := 'Mark + Cursor';
end;
end;
end; // case