View Issue Details

IDProjectCategoryView StatusLast Update
0033435LazarusIDEpublic2018-06-11 12:17
ReporterPhemtik Assigned ToMartin Friebe  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.9 (SVN) 
Target Version1.10Fixed in Version1.10 
Summary0033435: IDE Options: User Defined Markup don't auto size
DescriptionThe user defined markup don't auto size, so i can't see the possibility's for bold, italic and underline.

Also, alpha and priority don't auto size.
TagsNo tags attached.
Fixed in Revision58223
LazTarget1.0.10
WidgetsetGTK 2
Attached Files

Relationships

related to 0033843 new TFrame doesn't auto size correct 

Activities

Phemtik

2018-03-16 10:42

reporter  

Phemtik

2018-03-21 01:17

reporter  

user_defined_markup.patch (60,450 bytes)   
Index: components/lazcontrols/colorstringgrid.pas
===================================================================
--- components/lazcontrols/colorstringgrid.pas	(nonexistent)
+++ components/lazcontrols/colorstringgrid.pas	(working copy)
@@ -0,0 +1,105 @@
+{ TColorStringGrid
+
+  Copyright (C) 2018 Lazarus team
+
+  This library is free software; you can redistribute it and/or modify it
+  under the same terms as the Lazarus Component Library (LCL)
+
+  See the file COPYING.modifiedLGPL.txt, included in this distribution,
+  for details about the license.
+
+}
+unit ColorStringGrid;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  Classes, Types, Math,
+  // LCL
+  LCLType, LCLIntf, Controls, Graphics, GraphType, ComCtrls, ExtCtrls, Themes, Grids;
+
+type
+
+{ TColorStringGrid }
+
+TColorStringGrid = class(TStringGrid)
+private
+  FRowFontColor: Array of TColor;
+  function GetRowFontColor(AIndex: Integer): TColor;
+  procedure SetRowFontColor(AIndex: Integer; AValue: TColor);
+protected
+  procedure PrepareCanvas(aCol, aRow: Integer; aState: TGridDrawState); override;
+  procedure ColRowDeleted(IsColumn: Boolean; index: Integer); override;
+  procedure ColRowInserted(IsColumn: boolean; index: integer); override;
+  // no exchanged or move
+  procedure SizeChanged(OldColCount, OldRowCount: Integer); override;
+public
+  property RowFontColor[AIndex: Integer]: TColor read GetRowFontColor write SetRowFontColor;
+end;
+
+implementation
+
+{ TColorStringGrid }
+
+function TColorStringGrid.GetRowFontColor(AIndex: Integer): TColor;
+begin
+  assert(AIndex < Length(FRowFontColor), 'GetRowFontColor');
+  Result := FRowFontColor[AIndex];
+end;
+
+procedure TColorStringGrid.SetRowFontColor(AIndex: Integer; AValue: TColor);
+begin
+  assert(AIndex < Length(FRowFontColor), 'SetRowFontColor');
+  if FRowFontColor[AIndex] = AValue then
+    exit;
+  FRowFontColor[AIndex] := AValue;
+  Invalidate;
+end;
+
+procedure TColorStringGrid.PrepareCanvas(aCol, aRow: Integer; aState: TGridDrawState);
+begin
+  assert(aRow < Length(FRowFontColor));
+  inherited PrepareCanvas(aCol, aRow, aState);
+  Canvas.Font.Color := FRowFontColor[aRow];
+end;
+
+procedure TColorStringGrid.ColRowDeleted(IsColumn: Boolean; index: Integer);
+begin
+  inherited ColRowDeleted(IsColumn, index);
+  if IsColumn then exit;
+  assert(index < Length(FRowFontColor), 'ColRowDeleted');
+  if index < Length(FRowFontColor) - 1 then
+    move(FRowFontColor[index+1], FRowFontColor[index],
+      (Length(FRowFontColor)-index) * SizeOf(TColor));
+  SetLength(FRowFontColor, Length(FRowFontColor) - 1);
+end;
+
+procedure TColorStringGrid.ColRowInserted(IsColumn: boolean; index: integer);
+begin
+  inherited ColRowInserted(IsColumn, index);
+  if IsColumn then exit;
+  SetLength(FRowFontColor, Length(FRowFontColor) + 1);
+  assert(index < Length(FRowFontColor), 'ColRowInserted');
+  if index < Length(FRowFontColor) - 1 then
+    move(FRowFontColor[index], FRowFontColor[index+1],
+      (Length(FRowFontColor)-index) * SizeOf(TColor));
+  FRowFontColor[index] := Font.Color;
+end;
+
+procedure TColorStringGrid.SizeChanged(OldColCount, OldRowCount: Integer);
+var
+  i: Integer;
+begin
+  inherited SizeChanged(OldColCount, OldRowCount);
+  i := Length(FRowFontColor);
+  SetLength(FRowFontColor, RowCount);
+  while i < RowCount do begin
+    FRowFontColor[i] := Font.Color;
+    inc(i);
+  end;
+end;
+
+end.
+
Index: components/lazcontrols/design/registerlazcontrols.pas
===================================================================
--- components/lazcontrols/design/registerlazcontrols.pas	(revision 57538)
+++ components/lazcontrols/design/registerlazcontrols.pas	(working copy)
@@ -7,7 +7,7 @@
 uses
   Classes, SysUtils, ExtendedTabControls, ComponentEditors, ObjInspStrConsts, PropEdits,
   ComCtrls, CheckBoxThemed, DividerBevel, ExtendedNotebook, ListFilterEdit,
-  ListViewFilterEdit, LvlGraphCtrl, ShortPathEdit, SpinEx, TreeFilterEdit;
+  ListViewFilterEdit, LvlGraphCtrl, ShortPathEdit, SpinEx, TreeFilterEdit, ColorStringGrid;
 
 type
 
@@ -35,7 +35,7 @@
     TLvlGraphControl, TShortPathEdit, TSpinEditEx, TFloatSpinEditEx,
     TTreeFilterEdit, TExtendedTabControl]);
   //RegisterPropertyEditor(TypeInfo(TCaption), TCheckBoxThemed, 'Caption', TStringMultilinePropertyEditor);
-  RegisterNoIcon([TExtendedTabToolbar, TExtendedTabToolButton, TExtendedTabSheet]);
+  RegisterNoIcon([TExtendedTabToolbar, TExtendedTabToolButton, TExtendedTabSheet, TColorStringGrid]);
   RegisterComponentEditor(TExtendedTabControl, TExtendedTabControlComponentEditor);
 end;
 
Index: components/lazcontrols/lazcontrols.lpk
===================================================================
--- components/lazcontrols/lazcontrols.lpk	(revision 57538)
+++ components/lazcontrols/lazcontrols.lpk	(working copy)
@@ -16,7 +16,7 @@
     <Description Value="Some extra LCL controls needed by the IDE."/>
     <License Value="modified LGPL-2"/>
     <Version Major="1" Release="1"/>
-    <Files Count="12">
+    <Files Count="13">
       <Item1>
         <Filename Value="checkboxthemed.pas"/>
         <UnitName Value="CheckBoxThemed"/>
@@ -65,6 +65,10 @@
         <Filename Value="smallorderedseteditor.pas"/>
         <UnitName Value="SmallOrderedSetEditor"/>
       </Item12>
+      <Item13>
+        <Filename Value="colorstringgrid.pas"/>
+        <UnitName Value="ColorStringGrid"/>
+      </Item13>
     </Files>
     <LazDoc Paths="docs"/>
     <RequiredPkgs Count="1">
Index: components/lazcontrols/lazcontrols.pas
===================================================================
--- components/lazcontrols/lazcontrols.pas	(revision 57538)
+++ components/lazcontrols/lazcontrols.pas	(working copy)
@@ -8,9 +8,8 @@
 interface
 
 uses
-  CheckBoxThemed, DividerBevel, ExtendedNotebook, ListFilterEdit, 
-  ListViewFilterEdit, TreeFilterEdit, ShortPathEdit, LvlGraphCtrl, 
-  ExtendedTabControls, SpinEx, SmallOrderedSetEditor, LazarusPackageIntf;
+    CheckBoxThemed, DividerBevel, ExtendedNotebook, ListFilterEdit, ListViewFilterEdit, TreeFilterEdit, ShortPathEdit, 
+    LvlGraphCtrl, ExtendedTabControls, spinex, SmallOrderedSetEditor, ColorStringGrid, LazarusPackageIntf;
 
 implementation
 
Index: ide/frames/editor_markup_userdefined.lfm
===================================================================
--- ide/frames/editor_markup_userdefined.lfm	(revision 57538)
+++ ide/frames/editor_markup_userdefined.lfm	(working copy)
@@ -1,137 +1,114 @@
 object EditorMarkupUserDefinedFrame: TEditorMarkupUserDefinedFrame
   Left = 0
-  Height = 369
+  Height = 513
   Top = 0
-  Width = 507
-  ClientHeight = 369
-  ClientWidth = 507
+  Width = 692
+  ClientHeight = 513
+  ClientWidth = 692
+  OnResize = FrameResize
   TabOrder = 0
   DesignLeft = 432
   DesignTop = 323
-  object ToolBar1: TToolBar
-    Left = 0
-    Height = 24
-    Top = 0
-    Width = 507
-    AutoSize = True
-    Caption = 'ToolBar1'
-    EdgeBorders = [ebBottom]
-    ParentShowHint = False
-    ShowCaptions = True
-    ShowHint = True
-    TabOrder = 0
-    object tbSelectList: TToolButton
-      Left = 1
-      Top = 0
-      Caption = 'tbSelectList'
-      DropdownMenu = ListMenu
-      OnClick = tbSelectListClick
-      Style = tbsDropDown
-    end
-    object tbNewList: TToolButton
-      Left = 81
-      Top = 0
-      Caption = 'tbNewList'
-      OnClick = tbNewListClick
-    end
-    object tbDeleteList: TToolButton
-      Left = 142
-      Top = 0
-      Caption = 'tbDeleteList'
-      OnClick = tbDeleteListClick
-    end
-    object ToolButton2: TToolButton
-      Left = 212
-      Top = 0
-      Width = 5
-      Caption = 'ToolButton2'
-      Style = tbsDivider
-    end
-    object tbMainPage: TToolButton
-      Left = 217
-      Top = 0
-      AllowAllUp = True
-      Caption = 'tbMainPage'
-      Down = True
-      Grouped = True
-      OnClick = tbSelectPageClicked
-      Style = tbsCheck
-    end
-    object tbKeyPage: TToolButton
-      Left = 289
-      Top = 0
-      AllowAllUp = True
-      Caption = 'tbKeyPage'
-      Grouped = True
-      OnClick = tbSelectPageClicked
-      Style = tbsCheck
-    end
-  end
   object MainPanel: TPanel
+    AnchorSideLeft.Control = Owner
+    AnchorSideTop.Control = cbSelectList
+    AnchorSideTop.Side = asrBottom
+    AnchorSideRight.Control = Owner
+    AnchorSideRight.Side = asrBottom
+    AnchorSideBottom.Control = Owner
+    AnchorSideBottom.Side = asrBottom
     Left = 0
-    Height = 345
-    Top = 24
-    Width = 507
-    Align = alClient
+    Height = 461
+    Top = 52
+    Width = 692
+    Anchors = [akTop, akLeft, akRight, akBottom]
     AutoSize = True
+    BorderSpacing.Top = 6
     BevelOuter = bvNone
-    ClientHeight = 345
-    ClientWidth = 507
-    TabOrder = 1
-    inline SynColorAttrEditor1: TSynColorAttrEditor
-      Height = 146
-      Top = 217
-      Width = 507
-      Align = alTop
-      ClientHeight = 146
-      ClientWidth = 507
-      TabOrder = 1
-      inherited ForeGroundUseDefaultCheckBox: TCheckBox
-        AnchorSideLeft.Control = SynColorAttrEditor1
-      end
-      inherited ForegroundColorBox: TColorBox
-        AnchorSideTop.Control = SynColorAttrEditor1
-        AnchorSideRight.Control = SynColorAttrEditor1
-      end
-      inherited BackGroundColorBox: TColorBox
-        AnchorSideRight.Control = SynColorAttrEditor1
-      end
-      inherited FrameColorBox: TColorBox
-        AnchorSideRight.Control = SynColorAttrEditor1
-      end
-    end
-    object Notebook1: TNotebook
+    ClientHeight = 461
+    ClientWidth = 692
+    TabOrder = 3
+    object PageControl1: TPageControl
+      AnchorSideLeft.Control = MainPanel
+      AnchorSideRight.Control = MainPanel
+      AnchorSideRight.Side = asrBottom
+      AnchorSideBottom.Control = MainPanel
+      AnchorSideBottom.Side = asrBottom
       Left = 0
-      Height = 217
+      Height = 461
       Top = 0
-      Width = 507
-      PageIndex = 1
-      Align = alTop
-      AutoSize = True
-      Constraints.MinHeight = 195
+      Width = 692
+      ActivePage = tbMainPage
+      Anchors = [akTop, akLeft, akRight, akBottom]
+      TabIndex = 0
       TabOrder = 0
-      TabStop = True
-      object PageMain: TPage
-        object HCenter: TLabel
-          AnchorSideLeft.Control = PageMain
-          AnchorSideLeft.Side = asrCenter
-          AnchorSideTop.Control = PageMain
-          Left = 253
-          Height = 1
-          Top = 0
-          Width = 1
+      object tbMainPage: TTabSheet
+        Caption = 'tbMainPage'
+        ClientHeight = 421
+        ClientWidth = 686
+        object cbCaseSense: TCheckBox
+          AnchorSideLeft.Control = tbMainPage
+          AnchorSideTop.Control = edListName
+          AnchorSideTop.Side = asrBottom
+          Left = 6
+          Height = 32
+          Top = 52
+          Width = 120
+          BorderSpacing.Left = 6
+          BorderSpacing.Top = 6
+          Caption = 'cbCaseSense'
+          OnChange = GeneralCheckBoxChange
+          TabOrder = 1
+        end
+        object cbMatchStartBound: TCheckBox
+          AnchorSideLeft.Control = tbMainPage
+          AnchorSideTop.Control = cbCaseSense
+          AnchorSideTop.Side = asrBottom
+          Left = 6
+          Height = 32
+          Top = 90
+          Width = 160
+          BorderSpacing.Left = 6
+          BorderSpacing.Top = 6
+          Caption = 'cbMatchStartBound'
+          OnChange = GeneralCheckBoxChange
+          TabOrder = 2
+        end
+        object cbMatchEndBound: TCheckBox
+          AnchorSideLeft.Control = tbMainPage
+          AnchorSideTop.Control = cbMatchStartBound
+          AnchorSideTop.Side = asrBottom
+          Left = 6
+          Height = 32
+          Top = 128
+          Width = 153
+          BorderSpacing.Left = 6
+          BorderSpacing.Top = 6
+          Caption = 'cbMatchEndBound'
+          OnChange = GeneralCheckBoxChange
+          TabOrder = 3
+        end
+        object lbListName: TLabel
+          AnchorSideLeft.Control = tbMainPage
+          AnchorSideTop.Control = edListName
+          AnchorSideTop.Side = asrCenter
+          Left = 6
+          Height = 20
+          Top = 16
+          Width = 72
+          BorderSpacing.Around = 6
+          Caption = 'lbListName'
           ParentColor = False
         end
         object edListName: TEdit
+          AnchorSideLeft.Control = lbListName
           AnchorSideLeft.Side = asrBottom
-          AnchorSideTop.Control = PageMain
-          AnchorSideRight.Control = HCenter
-          Left = 84
-          Height = 23
+          AnchorSideTop.Control = tbMainPage
+          Left = 90
+          Height = 40
           Top = 6
-          Width = 143
-          Anchors = [akTop, akLeft, akRight]
-          BorderSpacing.Right = 20
+          Width = 168
+          BorderSpacing.Left = 6
           BorderSpacing.Around = 6
           OnEditingDone = edListNameEditingDone
           OnKeyPress = edListNameKeyPress
@@ -138,38 +115,28 @@
           TabOrder = 0
           Text = 'edListName'
         end
-        object lbListName: TLabel
-          AnchorSideLeft.Control = PageMain
-          AnchorSideTop.Control = edListName
-          AnchorSideTop.Side = asrCenter
-          Left = 6
-          Height = 15
-          Top = 10
-          Width = 60
-          BorderSpacing.Around = 6
-          Caption = 'lbListName'
-          ParentColor = False
-        end
         object WordList: TColorStringGrid
-          AnchorSideLeft.Control = HCenter
-          AnchorSideTop.Control = PageMain
-          AnchorSideRight.Control = PageMain
+          AnchorSideLeft.Control = edListName
+          AnchorSideLeft.Side = asrBottom
+          AnchorSideTop.Control = tbMainPage
+          AnchorSideRight.Control = tbMainPage
           AnchorSideRight.Side = asrBottom
-          AnchorSideBottom.Control = PageMain
-          AnchorSideBottom.Side = asrBottom
-          Left = 259
-          Height = 183
+          AnchorSideBottom.Control = gbListColorFont
+          Left = 264
+          Height = 154
           Top = 6
-          Width = 242
+          Width = 416
           Anchors = [akTop, akLeft, akRight, akBottom]
           AutoAdvance = aaDown
           AutoFillColumns = True
-          BorderSpacing.Around = 6
+          BorderSpacing.Left = 6
+          BorderSpacing.Top = 6
+          BorderSpacing.Right = 6
           ColCount = 1
           Columns = <          
             item
               Title.Caption = 'Title'
-              Width = 238
+              Width = 414
             end>
           FixedCols = 0
           FixedRows = 0
@@ -182,61 +149,306 @@
           OnKeyUp = WordListKeyUp
           OnSelection = WordListSelection
           ColWidths = (
-            238
+            414
           )
         end
-        object cbCaseSense: TCheckBox
-          AnchorSideLeft.Control = PageMain
-          AnchorSideTop.Control = edListName
-          Left = 6
-          Height = 19
-          Top = 42
-          Width = 88
-          BorderSpacing.Top = 30
-          BorderSpacing.Around = 6
-          Caption = 'cbCaseSense'
-          OnChange = GeneralCheckBoxChange
-          TabOrder = 1
-        end
-        object cbMatchStartBound: TCheckBox
-          AnchorSideLeft.Control = PageMain
-          AnchorSideTop.Control = cbCaseSense
+        object gbListColorFont: TGroupBox
+          AnchorSideLeft.Control = tbMainPage
+          AnchorSideTop.Control = cbMatchEndBound
           AnchorSideTop.Side = asrBottom
+          AnchorSideRight.Control = tbMainPage
+          AnchorSideRight.Side = asrBottom
           Left = 6
-          Height = 19
-          Top = 67
-          Width = 126
-          BorderSpacing.Around = 6
-          Caption = 'cbMatchStartBound'
-          OnChange = GeneralCheckBoxChange
-          TabOrder = 2
+          Height = 279
+          Top = 166
+          Width = 674
+          Anchors = [akTop, akLeft, akRight]
+          AutoSize = True
+          BorderSpacing.Left = 6
+          BorderSpacing.Top = 6
+          BorderSpacing.Right = 6
+          Caption = 'gbListColorFont'
+          ClientHeight = 258
+          ClientWidth = 672
+          TabOrder = 5
+          inline SynColorAttrEditor1: TSynColorAttrEditor
+            Height = 258
+            Width = 672
+            Align = alTop
+            ClientHeight = 258
+            ClientWidth = 672
+            inherited ForeGroundLabel: TLabel
+              Height = 20
+              Top = 13
+              Width = 110
+            end
+            inherited BackGroundLabel: TLabel
+              Height = 20
+              Top = 56
+              Width = 111
+            end
+            inherited ForeGroundUseDefaultCheckBox: TCheckBox
+              AnchorSideLeft.Control = SynColorAttrEditor1
+              Height = 32
+              Top = 7
+              Width = 245
+            end
+            inherited ForegroundColorBox: TColorBox
+              AnchorSideTop.Control = SynColorAttrEditor1
+              AnchorSideRight.Control = SynColorAttrEditor1
+              Left = 257
+              Height = 40
+              Width = 200
+            end
+            inherited BackGroundColorBox: TColorBox
+              AnchorSideRight.Control = SynColorAttrEditor1
+              Left = 257
+              Height = 40
+              Top = 46
+              Width = 200
+            end
+            inherited BackGroundUseDefaultCheckBox: TCheckBox
+              AnchorSideLeft.Control = SynColorAttrEditor1
+              Height = 32
+              Top = 50
+              Width = 246
+            end
+            inherited FrameColorBox: TColorBox
+              AnchorSideRight.Control = SynColorAttrEditor1
+              Left = 257
+              Height = 40
+              Top = 89
+              Width = 200
+            end
+            inherited FrameColorUseDefaultCheckBox: TCheckBox
+              AnchorSideLeft.Control = SynColorAttrEditor1
+              Height = 32
+              Top = 93
+              Width = 243
+            end
+            inherited pnlUnderline: TPanel
+              AnchorSideLeft.Control = SynColorAttrEditor1
+              Height = 64
+              Top = 175
+              Width = 188
+              ClientHeight = 64
+              ClientWidth = 188
+              inherited TextUnderlineRadioPanel: TPanel
+                Height = 32
+                Top = 32
+                Width = 188
+                BevelInner = bvNone
+                ClientHeight = 32
+                ClientWidth = 188
+                TabOrder = 1
+                inherited TextUnderlineRadioOn: TRadioButton
+                  Left = 3
+                  Height = 32
+                  Top = 0
+                  Width = 53
+                end
+                inherited TextUnderlineRadioOff: TRadioButton
+                  Left = 59
+                  Height = 32
+                  Top = 0
+                  Width = 55
+                end
+                inherited TextUnderlineRadioInvert: TRadioButton
+                  Left = 117
+                  Height = 32
+                  Top = 0
+                  Width = 71
+                end
+              end
+              inherited TextUnderlineCheckBox: TCheckBox
+                Height = 32
+                Width = 187
+                TabOrder = 0
+              end
+            end
+            inherited pnlBold: TPanel
+              Left = 200
+              Height = 64
+              Top = 175
+              Width = 188
+              ClientHeight = 64
+              ClientWidth = 188
+              inherited TextBoldRadioPanel: TPanel
+                Height = 32
+                Top = 32
+                Width = 188
+                BevelInner = bvNone
+                ClientHeight = 32
+                ClientWidth = 188
+                TabOrder = 1
+                inherited TextBoldRadioInvert: TRadioButton
+                  Left = 117
+                  Height = 32
+                  Top = 0
+                  Width = 71
+                end
+                inherited TextBoldRadioOn: TRadioButton
+                  Left = 3
+                  Height = 32
+                  Top = 0
+                  Width = 53
+                end
+                inherited TextBoldRadioOff: TRadioButton
+                  Left = 59
+                  Height = 32
+                  Top = 0
+                  Width = 55
+                end
+              end
+              inherited TextBoldCheckBox: TCheckBox
+                Height = 32
+                Width = 154
+                TabOrder = 0
+              end
+            end
+            inherited pnlItalic: TPanel
+              Left = 394
+              Height = 64
+              Top = 175
+              Width = 188
+              BorderSpacing.Right = 6
+              ClientHeight = 64
+              ClientWidth = 188
+              inherited TextItalicRadioPanel: TPanel
+                Height = 32
+                Top = 32
+                Width = 188
+                BevelInner = bvNone
+                ClientHeight = 32
+                ClientWidth = 188
+                TabOrder = 1
+                inherited TextItalicRadioInvert: TRadioButton
+                  Left = 117
+                  Height = 32
+                  Top = 0
+                  Width = 71
+                end
+                inherited TextItalicRadioOn: TRadioButton
+                  Left = 3
+                  Height = 32
+                  Top = 0
+                  Width = 53
+                end
+                inherited TextItalicRadioOff: TRadioButton
+                  Left = 59
+                  Height = 32
+                  Top = 0
+                  Width = 55
+                end
+              end
+              inherited TextItalicCheckBox: TCheckBox
+                Height = 32
+                Width = 155
+                TabOrder = 0
+              end
+            end
+            inherited FrameStyleBox: TComboBox
+              Left = 360
+              Height = 40
+              Top = 132
+            end
+            inherited FrameEdgesBox: TComboBox
+              Left = 257
+              Height = 40
+              Top = 132
+            end
+            inherited ColumnPosBevel: TPanel
+              Left = 257
+              Top = 242
+            end
+            inherited ForeAlphaLabel: TLabel
+              Left = 467
+              Height = 20
+              Top = 13
+              Width = 99
+            end
+            inherited BackAlphaLabel: TLabel
+              Left = 467
+              Height = 20
+              Top = 56
+              Width = 100
+            end
+            inherited FrameAlphaLabel: TLabel
+              Left = 467
+              Height = 20
+              Top = 99
+              Width = 110
+            end
+            inherited ForeAlphaSpin: TSpinEdit
+              Left = 572
+              Height = 40
+              Top = 3
+              Width = 65
+            end
+            inherited BackAlphaSpin: TSpinEdit
+              Left = 573
+              Height = 40
+              Top = 46
+              Width = 65
+            end
+            inherited FrameAlphaSpin: TSpinEdit
+              Left = 583
+              Height = 40
+              Top = 89
+              Width = 65
+            end
+            inherited ForePriorLabel: TLabel
+              Left = 647
+              Height = 20
+              Top = 13
+              Width = 92
+            end
+            inherited BackPriorLabel: TLabel
+              Left = 648
+              Height = 20
+              Top = 56
+              Width = 93
+            end
+            inherited FramePriorLabel: TLabel
+              Left = 658
+              Height = 20
+              Top = 99
+              Width = 103
+            end
+            inherited ForePriorSpin: TSpinEdit
+              Left = 745
+              Height = 40
+              Top = 3
+              Width = 75
+            end
+            inherited BackPriorSpin: TSpinEdit
+              Left = 747
+              Height = 40
+              Top = 46
+              Width = 75
+            end
+            inherited FramePriorSpin: TSpinEdit
+              Left = 767
+              Height = 40
+              Top = 89
+              Width = 75
+            end
+          end
         end
-        object cbMatchEndBound: TCheckBox
-          AnchorSideLeft.Control = PageMain
-          AnchorSideTop.Control = cbMatchStartBound
-          AnchorSideTop.Side = asrBottom
-          Left = 6
-          Height = 19
-          Top = 92
-          Width = 122
-          BorderSpacing.Around = 6
-          Caption = 'cbMatchEndBound'
-          OnChange = GeneralCheckBoxChange
-          TabOrder = 3
-        end
       end
-      object PageKeys: TPage
+      object tbKeyPage: TTabSheet
+        Caption = 'tbKeyPage'
+        ClientHeight = 421
+        ClientWidth = 686
         object cbKeyCase: TCheckBox
-          AnchorSideLeft.Control = PageKeys
+          AnchorSideLeft.Control = tbKeyPage
           AnchorSideTop.Control = lbNewKeyOptions
           AnchorSideTop.Side = asrBottom
-          AnchorSideRight.Control = HCenterKey
           AnchorSideRight.Side = asrBottom
           Left = 6
-          Height = 19
-          Top = 26
-          Width = 228
-          Anchors = [akTop, akLeft, akRight]
+          Height = 32
+          Top = 31
+          Width = 104
           BorderSpacing.Left = 6
           BorderSpacing.Top = 5
           BorderSpacing.Right = 20
@@ -245,60 +457,193 @@
           TabOrder = 0
         end
         object lbNewKeyOptions: TLabel
-          AnchorSideLeft.Control = PageKeys
-          AnchorSideTop.Control = PageKeys
-          AnchorSideRight.Control = HCenterKey
+          AnchorSideLeft.Control = tbKeyPage
+          AnchorSideTop.Control = tbKeyPage
           AnchorSideRight.Side = asrBottom
           Left = 6
-          Height = 15
+          Height = 20
           Top = 6
-          Width = 242
-          Anchors = [akTop, akLeft, akRight]
+          Width = 121
           BorderSpacing.Left = 6
           BorderSpacing.Top = 6
           BorderSpacing.Right = 6
           Caption = 'lbNewKeyOptions'
+          Font.Style = [fsBold]
           ParentColor = False
+          ParentFont = False
           WordWrap = True
         end
-        object Panel1: TPanel
-          AnchorSideLeft.Control = HCenterKey
-          AnchorSideTop.Control = PageKeys
-          AnchorSideRight.Control = PageKeys
+        object cbKeyBoundStart: TCheckBox
+          AnchorSideLeft.Control = tbKeyPage
+          AnchorSideTop.Control = cbKeyCase
+          AnchorSideTop.Side = asrBottom
           AnchorSideRight.Side = asrBottom
-          AnchorSideBottom.Control = PageKeys
-          AnchorSideBottom.Side = asrBottom
-          Left = 253
-          Height = 217
-          Top = 0
-          Width = 254
-          Anchors = [akTop, akLeft, akRight, akBottom]
-          BevelOuter = bvNone
-          ClientHeight = 217
-          ClientWidth = 254
+          Left = 6
+          Height = 32
+          Top = 69
+          Width = 145
+          BorderSpacing.Left = 6
+          BorderSpacing.Top = 6
+          BorderSpacing.Right = 20
+          Caption = 'cbKeyBoundStart'
+          OnChange = GeneralCheckBoxChange
           TabOrder = 1
-          object divKeyAdd: TDividerBevel
+        end
+        object cbKeyBoundEnd: TCheckBox
+          AnchorSideLeft.Control = tbKeyPage
+          AnchorSideTop.Control = cbKeyBoundStart
+          AnchorSideTop.Side = asrBottom
+          AnchorSideRight.Side = asrBottom
+          Left = 6
+          Height = 32
+          Top = 107
+          Width = 138
+          BorderSpacing.Left = 6
+          BorderSpacing.Top = 6
+          BorderSpacing.Right = 20
+          Caption = 'cbKeyBoundEnd'
+          OnChange = GeneralCheckBoxChange
+          TabOrder = 2
+        end
+        object cbSmartSelectBound: TCheckBox
+          AnchorSideLeft.Control = tbKeyPage
+          AnchorSideTop.Control = gbKeyBoundMinLen
+          AnchorSideTop.Side = asrBottom
+          AnchorSideRight.Side = asrBottom
+          Left = 6
+          Height = 32
+          Top = 248
+          Width = 169
+          BorderSpacing.Left = 6
+          BorderSpacing.Top = 6
+          BorderSpacing.Right = 20
+          BorderSpacing.Bottom = 6
+          Caption = 'cbSmartSelectBound'
+          OnChange = GeneralCheckBoxChange
+          TabOrder = 3
+        end
+        object cbGlobalList: TCheckBox
+          AnchorSideLeft.Control = tbKeyPage
+          AnchorSideTop.Control = cbSmartSelectBound
+          AnchorSideTop.Side = asrBottom
+          AnchorSideRight.Side = asrBottom
+          Left = 6
+          Height = 32
+          Top = 286
+          Width = 112
+          BorderSpacing.Left = 6
+          BorderSpacing.Top = 6
+          BorderSpacing.Right = 20
+          BorderSpacing.Bottom = 6
+          Caption = 'cbGlobalList'
+          OnChange = GeneralCheckBoxChange
+          TabOrder = 4
+        end
+        object gbKeyBoundMinLen: TGroupBox
+          AnchorSideLeft.Control = tbKeyPage
+          AnchorSideTop.Control = cbKeyBoundEnd
+          AnchorSideTop.Side = asrBottom
+          Left = 6
+          Height = 97
+          Top = 145
+          Width = 172
+          BorderSpacing.Left = 6
+          BorderSpacing.Top = 6
+          Caption = 'gbKeyBoundMinLen'
+          ClientHeight = 76
+          ClientWidth = 170
+          TabOrder = 5
+          object lbWordMin: TLabel
+            AnchorSideLeft.Control = gbKeyBoundMinLen
+            AnchorSideTop.Control = gbKeyBoundMinLen
+            AnchorSideRight.Side = asrBottom
             Left = 6
-            Height = 17
-            Top = 0
-            Width = 242
-            Caption = 'divKeyAdd'
-            Align = alTop
+            Height = 20
+            Top = 6
+            Width = 70
             BorderSpacing.Left = 6
+            BorderSpacing.Top = 6
             BorderSpacing.Right = 6
-            Font.Style = [fsBold]
-            ParentFont = False
-            LeftIndent = 30
+            Caption = 'lbWordMin'
+            ParentColor = False
+            WordWrap = True
           end
-          object btnKeyAdd: TSpeedButton
-            AnchorSideLeft.Control = Panel1
-            AnchorSideTop.Control = divKeyAdd
+          object lbSelectMin: TLabel
+            AnchorSideLeft.Control = lbWordMin
+            AnchorSideLeft.Side = asrBottom
+            AnchorSideTop.Control = gbKeyBoundMinLen
+            AnchorSideRight.Side = asrBottom
+            Left = 88
+            Height = 20
+            Top = 6
+            Width = 76
+            BorderSpacing.Left = 12
+            BorderSpacing.Top = 6
+            BorderSpacing.Right = 6
+            Caption = 'lbSelectMin'
+            ParentColor = False
+            WordWrap = True
+          end
+          object edWordMin: TSpinEdit
+            AnchorSideLeft.Control = lbWordMin
+            AnchorSideTop.Control = lbWordMin
             AnchorSideTop.Side = asrBottom
+            AnchorSideRight.Side = asrBottom
             Left = 6
+            Height = 40
+            Top = 30
+            Width = 70
+            BorderSpacing.Top = 4
+            BorderSpacing.Right = 6
+            BorderSpacing.Bottom = 6
+            MaxValue = 9999
+            OnChange = GeneralCheckBoxChange
+            TabOrder = 0
+          end
+          object edSelectMin: TSpinEdit
+            AnchorSideLeft.Control = lbSelectMin
+            AnchorSideTop.Control = lbSelectMin
+            AnchorSideTop.Side = asrBottom
+            AnchorSideRight.Side = asrBottom
+            Left = 88
+            Height = 40
+            Top = 30
+            Width = 70
+            BorderSpacing.Top = 4
+            BorderSpacing.Right = 6
+            BorderSpacing.Bottom = 6
+            MaxValue = 9999
+            OnChange = GeneralCheckBoxChange
+            TabOrder = 1
+          end
+        end
+        object gbKeyAdd: TGroupBox
+          AnchorSideLeft.Control = gbKeyBoundMinLen
+          AnchorSideLeft.Side = asrBottom
+          AnchorSideTop.Control = cbKeyCase
+          AnchorSideRight.Control = tbKeyPage
+          AnchorSideRight.Side = asrBottom
+          Left = 198
+          Height = 81
+          Top = 31
+          Width = 515
+          Align = alCustom
+          Anchors = [akTop, akLeft, akRight]
+          BorderSpacing.Left = 20
+          BorderSpacing.Right = 6
+          Caption = 'gbKeyAdd'
+          ClientHeight = 60
+          ClientWidth = 513
+          TabOrder = 6
+          object btnKeyAdd: TSpeedButton
+            AnchorSideLeft.Control = gbKeyAdd
+            AnchorSideTop.Control = gbKeyAdd
+            Left = 6
             Height = 22
-            Top = 17
+            Top = 6
             Width = 23
             BorderSpacing.Left = 6
+            BorderSpacing.Top = 6
             Caption = '...'
             OnClick = KeyEditClicked
           end
@@ -306,13 +651,12 @@
             AnchorSideLeft.Control = btnKeyAdd
             AnchorSideLeft.Side = asrBottom
             AnchorSideTop.Control = btnKeyAdd
-            AnchorSideRight.Control = Panel1
+            AnchorSideTop.Side = asrCenter
             AnchorSideRight.Side = asrBottom
             Left = 35
-            Height = 15
-            Top = 17
-            Width = 213
-            Anchors = [akTop, akLeft, akRight]
+            Height = 20
+            Top = 7
+            Width = 69
             BorderSpacing.Left = 6
             BorderSpacing.Right = 6
             Caption = 'lbKeyAdd1'
@@ -320,92 +664,60 @@
           end
           object lbKeyAdd2: TLabel
             AnchorSideLeft.Control = lbKeyAdd1
-            AnchorSideTop.Control = lbKeyAdd1
+            AnchorSideTop.Control = btnKeyAdd
             AnchorSideTop.Side = asrBottom
-            AnchorSideRight.Control = Panel1
             AnchorSideRight.Side = asrBottom
             Left = 35
-            Height = 15
-            Top = 38
-            Width = 219
-            Anchors = [akTop, akLeft, akRight]
+            Height = 20
+            Top = 34
+            Width = 69
             BorderSpacing.Top = 6
+            BorderSpacing.Right = 6
+            BorderSpacing.Bottom = 6
             Caption = 'lbKeyAdd2'
             ParentColor = False
           end
-          object divKeyRemove: TDividerBevel
-            AnchorSideLeft.Control = Panel1
-            AnchorSideTop.Control = lbKeyAdd2
-            AnchorSideTop.Side = asrBottom
-            AnchorSideRight.Control = Panel1
-            AnchorSideRight.Side = asrBottom
-            Left = 6
-            Height = 17
-            Top = 59
-            Width = 242
-            Caption = 'divKeyRemove'
-            Anchors = [akTop, akLeft, akRight]
-            BorderSpacing.Left = 6
-            BorderSpacing.Top = 6
-            BorderSpacing.Right = 6
-            Font.Style = [fsBold]
-            ParentFont = False
-            LeftIndent = 30
-          end
-          object divKeyToggle: TDividerBevel
-            AnchorSideLeft.Control = Panel1
-            AnchorSideTop.Control = lbKeyRemove2
-            AnchorSideTop.Side = asrBottom
-            AnchorSideRight.Control = Panel1
-            AnchorSideRight.Side = asrBottom
-            Left = 6
-            Height = 17
-            Top = 118
-            Width = 242
-            Caption = 'divKeyToggle'
-            Anchors = [akTop, akLeft, akRight]
-            BorderSpacing.Left = 6
-            BorderSpacing.Top = 6
-            BorderSpacing.Right = 6
-            Font.Style = [fsBold]
-            ParentFont = False
-            LeftIndent = 30
-          end
+        end
+        object gbKeyRemove: TGroupBox
+          AnchorSideLeft.Control = gbKeyAdd
+          AnchorSideTop.Control = gbKeyAdd
+          AnchorSideTop.Side = asrBottom
+          AnchorSideRight.Control = tbKeyPage
+          AnchorSideRight.Side = asrBottom
+          Left = 198
+          Height = 81
+          Top = 118
+          Width = 515
+          Anchors = [akTop, akLeft, akRight]
+          AutoSize = True
+          BorderSpacing.Top = 6
+          BorderSpacing.Right = 6
+          Caption = 'gbKeyRemove'
+          ClientHeight = 60
+          ClientWidth = 513
+          TabOrder = 7
           object btnKeyRemove: TSpeedButton
-            AnchorSideLeft.Control = Panel1
-            AnchorSideTop.Control = divKeyRemove
-            AnchorSideTop.Side = asrBottom
+            AnchorSideLeft.Control = gbKeyRemove
+            AnchorSideTop.Control = gbKeyRemove
             Left = 6
             Height = 22
-            Top = 76
+            Top = 6
             Width = 23
             BorderSpacing.Left = 6
+            BorderSpacing.Top = 6
             Caption = '...'
             OnClick = KeyEditClicked
           end
-          object btnKeyToggle: TSpeedButton
-            AnchorSideLeft.Control = Panel1
-            AnchorSideTop.Control = divKeyToggle
-            AnchorSideTop.Side = asrBottom
-            Left = 6
-            Height = 22
-            Top = 135
-            Width = 23
-            BorderSpacing.Left = 6
-            Caption = '...'
-            OnClick = KeyEditClicked
-          end
           object lbKeyRemove1: TLabel
             AnchorSideLeft.Control = btnKeyRemove
             AnchorSideLeft.Side = asrBottom
             AnchorSideTop.Control = btnKeyRemove
-            AnchorSideRight.Control = Panel1
+            AnchorSideTop.Side = asrCenter
             AnchorSideRight.Side = asrBottom
             Left = 35
-            Height = 15
-            Top = 76
-            Width = 213
-            Anchors = [akTop, akLeft, akRight]
+            Height = 20
+            Top = 7
+            Width = 96
             BorderSpacing.Left = 6
             BorderSpacing.Right = 6
             Caption = 'lbKeyRemove1'
@@ -413,31 +725,60 @@
           end
           object lbKeyRemove2: TLabel
             AnchorSideLeft.Control = lbKeyRemove1
-            AnchorSideTop.Control = lbKeyRemove1
+            AnchorSideTop.Control = btnKeyRemove
             AnchorSideTop.Side = asrBottom
-            AnchorSideRight.Control = Panel1
             AnchorSideRight.Side = asrBottom
             Left = 35
-            Height = 15
-            Top = 97
-            Width = 213
-            Anchors = [akTop, akLeft, akRight]
+            Height = 20
+            Top = 34
+            Width = 96
             BorderSpacing.Top = 6
             BorderSpacing.Right = 6
+            BorderSpacing.Bottom = 6
             Caption = 'lbKeyRemove2'
             ParentColor = False
           end
+        end
+        object gbKeyToggle: TGroupBox
+          AnchorSideLeft.Control = gbKeyRemove
+          AnchorSideTop.Control = gbKeyRemove
+          AnchorSideTop.Side = asrBottom
+          AnchorSideRight.Control = tbKeyPage
+          AnchorSideRight.Side = asrBottom
+          Left = 198
+          Height = 81
+          Top = 205
+          Width = 515
+          Anchors = [akTop, akLeft, akRight]
+          AutoSize = True
+          BorderSpacing.Top = 6
+          BorderSpacing.Right = 6
+          Caption = 'gbKeyToggle'
+          ClientHeight = 60
+          ClientWidth = 513
+          TabOrder = 8
+          object btnKeyToggle: TSpeedButton
+            AnchorSideLeft.Control = gbKeyToggle
+            AnchorSideTop.Control = gbKeyToggle
+            Left = 6
+            Height = 22
+            Top = 6
+            Width = 23
+            BorderSpacing.Left = 6
+            BorderSpacing.Top = 6
+            Caption = '...'
+            OnClick = KeyEditClicked
+          end
           object lbKeyToggle1: TLabel
             AnchorSideLeft.Control = btnKeyToggle
             AnchorSideLeft.Side = asrBottom
             AnchorSideTop.Control = btnKeyToggle
-            AnchorSideRight.Control = Panel1
+            AnchorSideTop.Side = asrCenter
             AnchorSideRight.Side = asrBottom
             Left = 35
-            Height = 15
-            Top = 135
-            Width = 213
-            Anchors = [akTop, akLeft, akRight]
+            Height = 20
+            Top = 7
+            Width = 88
             BorderSpacing.Left = 6
             BorderSpacing.Right = 6
             Caption = 'lbKeyToggle1'
@@ -445,15 +786,13 @@
           end
           object lbKeyToggle2: TLabel
             AnchorSideLeft.Control = lbKeyToggle1
-            AnchorSideTop.Control = lbKeyToggle1
+            AnchorSideTop.Control = btnKeyToggle
             AnchorSideTop.Side = asrBottom
-            AnchorSideRight.Control = Panel1
             AnchorSideRight.Side = asrBottom
             Left = 35
-            Height = 15
-            Top = 156
-            Width = 213
-            Anchors = [akTop, akLeft, akRight]
+            Height = 20
+            Top = 34
+            Width = 88
             BorderSpacing.Top = 6
             BorderSpacing.Right = 6
             BorderSpacing.Bottom = 6
@@ -461,194 +800,60 @@
             ParentColor = False
           end
         end
-        object HCenterKey: TLabel
-          AnchorSideLeft.Control = PageKeys
-          AnchorSideLeft.Side = asrCenter
-          AnchorSideTop.Control = PageKeys
-          Left = 253
-          Height = 1
-          Top = 0
-          Width = 1
-          ParentColor = False
-        end
-        object cbKeyBoundStart: TCheckBox
-          AnchorSideLeft.Control = PageKeys
-          AnchorSideTop.Control = cbKeyCase
-          AnchorSideTop.Side = asrBottom
-          AnchorSideRight.Control = HCenterKey
-          AnchorSideRight.Side = asrBottom
-          Left = 6
-          Height = 19
-          Top = 50
-          Width = 228
-          Anchors = [akTop, akLeft, akRight]
-          BorderSpacing.Left = 6
-          BorderSpacing.Top = 5
-          BorderSpacing.Right = 20
-          Caption = 'cbKeyBoundStart'
-          OnChange = GeneralCheckBoxChange
-          TabOrder = 2
-        end
-        object cbKeyBoundEnd: TCheckBox
-          AnchorSideLeft.Control = PageKeys
-          AnchorSideTop.Control = cbKeyBoundStart
-          AnchorSideTop.Side = asrBottom
-          AnchorSideRight.Control = HCenterKey
-          AnchorSideRight.Side = asrBottom
-          Left = 6
-          Height = 19
-          Top = 74
-          Width = 228
-          Anchors = [akTop, akLeft, akRight]
-          BorderSpacing.Left = 6
-          BorderSpacing.Top = 5
-          BorderSpacing.Right = 20
-          Caption = 'cbKeyBoundEnd'
-          OnChange = GeneralCheckBoxChange
-          TabOrder = 3
-        end
-        object lbKeyBoundMinLen: TLabel
-          AnchorSideLeft.Control = PageKeys
-          AnchorSideTop.Control = cbKeyBoundEnd
-          AnchorSideTop.Side = asrBottom
-          AnchorSideRight.Control = HCenterKey
-          Left = 6
-          Height = 15
-          Top = 101
-          Width = 241
-          Anchors = [akTop, akLeft, akRight]
-          BorderSpacing.Left = 6
-          BorderSpacing.Top = 8
-          BorderSpacing.Right = 6
-          Caption = 'lbKeyBoundMinLen'
-          ParentColor = False
-          WordWrap = True
-        end
-        object lbWordMin: TLabel
-          AnchorSideLeft.Control = PageKeys
-          AnchorSideTop.Control = lbKeyBoundMinLen
-          AnchorSideTop.Side = asrBottom
-          AnchorSideRight.Control = HQuarter
-          AnchorSideRight.Side = asrBottom
-          Left = 6
-          Height = 15
-          Top = 119
-          Width = 116
-          Anchors = [akTop, akLeft, akRight]
-          BorderSpacing.Left = 6
-          BorderSpacing.Top = 3
-          BorderSpacing.Right = 6
-          Caption = 'lbWordMin'
-          ParentColor = False
-          WordWrap = True
-        end
-        object lbSelectMin: TLabel
-          AnchorSideLeft.Control = HQuarter
-          AnchorSideTop.Control = lbWordMin
-          AnchorSideRight.Control = HCenterKey
-          AnchorSideRight.Side = asrBottom
-          Left = 133
-          Height = 15
-          Top = 119
-          Width = 115
-          Anchors = [akTop, akLeft, akRight]
-          BorderSpacing.Left = 6
-          BorderSpacing.Right = 6
-          Caption = 'lbSelectMin'
-          ParentColor = False
-          WordWrap = True
-        end
-        object edWordMin: TSpinEdit
-          AnchorSideLeft.Control = PageKeys
-          AnchorSideTop.Control = lbWordMin
-          AnchorSideTop.Side = asrBottom
-          AnchorSideRight.Control = HQuarter
-          AnchorSideRight.Side = asrBottom
-          Left = 6
-          Height = 23
-          Top = 138
-          Width = 70
-          Anchors = [akTop, akLeft, akRight]
-          BorderSpacing.Left = 6
-          BorderSpacing.Top = 4
-          BorderSpacing.Right = 6
-          Constraints.MaxWidth = 70
-          MaxValue = 9999
-          OnChange = GeneralCheckBoxChange
-          TabOrder = 4
-        end
-        object edSelectMin: TSpinEdit
-          AnchorSideLeft.Control = HQuarter
-          AnchorSideTop.Control = lbSelectMin
-          AnchorSideTop.Side = asrBottom
-          AnchorSideRight.Control = HCenterKey
-          AnchorSideRight.Side = asrBottom
-          Left = 133
-          Height = 23
-          Top = 138
-          Width = 70
-          Anchors = [akTop, akLeft, akRight]
-          BorderSpacing.Left = 6
-          BorderSpacing.Top = 4
-          BorderSpacing.Right = 6
-          Constraints.MaxWidth = 70
-          MaxValue = 9999
-          OnChange = GeneralCheckBoxChange
-          TabOrder = 5
-        end
-        object HQuarter: TLabel
-          AnchorSideLeft.Control = lbNewKeyOptions
-          AnchorSideLeft.Side = asrCenter
-          AnchorSideTop.Control = PageKeys
-          Left = 127
-          Height = 1
-          Top = 0
-          Width = 1
-          ParentColor = False
-        end
-        object cbSmartSelectBound: TCheckBox
-          AnchorSideLeft.Control = PageKeys
-          AnchorSideTop.Control = edWordMin
-          AnchorSideTop.Side = asrBottom
-          AnchorSideRight.Control = HCenterKey
-          AnchorSideRight.Side = asrBottom
-          Left = 6
-          Height = 19
-          Top = 167
-          Width = 228
-          Anchors = [akTop, akLeft, akRight]
-          BorderSpacing.Left = 6
-          BorderSpacing.Top = 6
-          BorderSpacing.Right = 20
-          BorderSpacing.Bottom = 6
-          Caption = 'cbSmartSelectBound'
-          OnChange = GeneralCheckBoxChange
-          TabOrder = 6
-        end
-        object cbGlobalList: TCheckBox
-          AnchorSideLeft.Control = PageKeys
-          AnchorSideTop.Control = cbSmartSelectBound
-          AnchorSideTop.Side = asrBottom
-          AnchorSideRight.Control = HCenterKey
-          AnchorSideRight.Side = asrBottom
-          Left = 6
-          Height = 19
-          Top = 192
-          Width = 228
-          Anchors = [akTop, akLeft, akRight]
-          BorderSpacing.Left = 6
-          BorderSpacing.Top = 6
-          BorderSpacing.Right = 20
-          BorderSpacing.Bottom = 6
-          Caption = 'cbGlobalList'
-          OnChange = GeneralCheckBoxChange
-          TabOrder = 7
-        end
       end
     end
   end
-  object ListMenu: TPopupMenu
-    left = 456
-    top = 65528
+  object cbSelectList: TComboBox
+    AnchorSideLeft.Control = Owner
+    AnchorSideTop.Control = Owner
+    Left = 0
+    Height = 40
+    Top = 6
+    Width = 100
+    AutoCompleteText = []
+    AutoSelect = False
+    AutoSize = False
+    BorderSpacing.Top = 6
+    ItemHeight = 0
+    OnSelect = DoListSelected
+    ParentShowHint = False
+    Style = csDropDownList
+    TabOrder = 0
   end
+  object btnNewList: TButton
+    AnchorSideLeft.Control = cbSelectList
+    AnchorSideLeft.Side = asrBottom
+    AnchorSideTop.Control = Owner
+    AnchorSideBottom.Control = cbSelectList
+    AnchorSideBottom.Side = asrBottom
+    Left = 106
+    Height = 40
+    Top = 6
+    Width = 93
+    Anchors = [akTop, akLeft, akBottom]
+    AutoSize = True
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 6
+    Caption = 'btnNewList'
+    OnClick = tbNewListClick
+    TabOrder = 1
+  end
+  object btnDeleteList: TButton
+    AnchorSideLeft.Control = btnNewList
+    AnchorSideLeft.Side = asrBottom
+    AnchorSideTop.Control = Owner
+    AnchorSideBottom.Control = btnNewList
+    AnchorSideBottom.Side = asrBottom
+    Left = 205
+    Height = 40
+    Top = 6
+    Width = 106
+    Anchors = [akTop, akLeft, akBottom]
+    AutoSize = True
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 6
+    Caption = 'btnDeleteList'
+    OnClick = tbDeleteListClick
+    TabOrder = 2
+  end
 end
Index: ide/frames/editor_markup_userdefined.pas
===================================================================
--- ide/frames/editor_markup_userdefined.pas	(revision 57538)
+++ ide/frames/editor_markup_userdefined.pas	(working copy)
@@ -10,31 +10,16 @@
   IDEOptionsIntf, IDECommands, IDEDialogs, Spin, ExtCtrls,
   editor_color_options, editor_general_options, editor_keymapping_options,
   SynEdit, SynCompletion, SynHighlighterPas, SynEditKeyCmds,
-  SynEditMarkupHighAll, DividerBevel, LazLoggerBase, LCLType, Menus, Grids,
-  Controls, Dialogs, Buttons;
+  SynEditMarkupHighAll, DividerBevel, LazLoggerBase, LCLType, Menus,
+  Controls, Dialogs, Buttons, ColorStringGrid;
 
 type
 
-  { TColorStringGrid }
-
-  TColorStringGrid = class(TStringGrid)
-  private
-    FRowFontColor: Array of TColor;
-    function GetRowFontColor(AIndex: Integer): TColor;
-    procedure SetRowFontColor(AIndex: Integer; AValue: TColor);
-  protected
-    procedure PrepareCanvas(aCol, aRow: Integer; aState: TGridDrawState); override;
-    procedure ColRowDeleted(IsColumn: Boolean; index: Integer); override;
-    procedure ColRowInserted(IsColumn: boolean; index: integer); override;
-    // no exchanged or move
-    procedure SizeChanged(OldColCount, OldRowCount: Integer); override;
-  public
-    property RowFontColor[AIndex: Integer]: TColor read GetRowFontColor write SetRowFontColor;
-  end;
-
   { TEditorMarkupUserDefinedFrame }
 
   TEditorMarkupUserDefinedFrame = class(TAbstractIDEOptionsEditor)
+      btnNewList: TButton;
+      btnDeleteList: TButton;
     cbCaseSense: TCheckBox;
     cbMatchEndBound: TCheckBox;
     cbMatchStartBound: TCheckBox;
@@ -43,17 +28,16 @@
     cbKeyBoundEnd: TCheckBox;
     cbSmartSelectBound: TCheckBox;
     cbGlobalList: TCheckBox;
-    divKeyAdd: TDividerBevel;
-    divKeyRemove: TDividerBevel;
-    divKeyToggle: TDividerBevel;
+    cbSelectList: TComboBox;
     edListName: TEdit;
-    HCenter: TLabel;
+    gbListColorFont: TGroupBox;
+    gbKeyToggle: TGroupBox;
+    gbKeyRemove: TGroupBox;
+    gbKeyAdd: TGroupBox;
+    gbKeyBoundMinLen: TGroupBox;
     lbWordMin: TLabel;
     lbSelectMin: TLabel;
-    HQuarter: TLabel;
-    lbKeyBoundMinLen: TLabel;
     lbNewKeyOptions: TLabel;
-    HCenterKey: TLabel;
     lbKeyAdd1: TLabel;
     lbKeyAdd2: TLabel;
     lbKeyRemove1: TLabel;
@@ -61,12 +45,8 @@
     lbKeyToggle1: TLabel;
     lbKeyToggle2: TLabel;
     lbListName: TLabel;
-    ListMenu: TPopupMenu;
     MainPanel: TPanel;
-    Notebook1: TNotebook;
-    PageMain: TPage;
-    PageKeys: TPage;
-    Panel1: TPanel;
+    PageControl1: TPageControl;
     btnKeyAdd: TSpeedButton;
     btnKeyRemove: TSpeedButton;
     btnKeyToggle: TSpeedButton;
@@ -73,22 +53,17 @@
     edWordMin: TSpinEdit;
     edSelectMin: TSpinEdit;
     SynColorAttrEditor1: TSynColorAttrEditor;
-    ToolBar1: TToolBar;
-    tbSelectList: TToolButton;
-    tbNewList: TToolButton;
-    tbDeleteList: TToolButton;
-    ToolButton2: TToolButton;
-    tbMainPage: TToolButton;
-    tbKeyPage: TToolButton;
+    tbKeyPage: TTabSheet;
+    tbMainPage: TTabSheet;
     WordList: TColorStringGrid;
     procedure edListNameEditingDone(Sender: TObject);
     procedure edListNameKeyPress(Sender: TObject; var Key: char);
+    procedure FrameResize(Sender: TObject);
     procedure KeyEditClicked(Sender: TObject);
     procedure tbDeleteListClick(Sender: TObject);
     procedure tbNewListClick(Sender: TObject);
-    procedure tbSelectListClick(Sender: TObject);
+    procedure DoListSelected(Sender: TObject);
     procedure GeneralCheckBoxChange(Sender: TObject);
-    procedure tbSelectPageClicked(Sender: TObject);
     procedure WordListColRowDeleted(Sender: TObject; {%H-}IsColumn: Boolean; {%H-}sIndex,
       {%H-}tIndex: Integer);
     procedure WordListEditingDone(Sender: TObject);
@@ -105,12 +80,12 @@
     FSelectedRow: Integer;
     FUpdatingDisplay: Integer;
     procedure CheckDuplicate(AnIndex: Integer);
-    procedure DoListSelected(Sender: TObject);
     procedure MaybeCleanEmptyRow(aRow: Integer);
     procedure UpdateKeys;
     procedure UpdateTermOptions;
     procedure UpdateListDropDownFull;
     procedure UpdateListDropDownCaption;
+    procedure UpdateListDropDownResize;
     procedure UpdateListDisplay(KeepDuplicates: Boolean = False);
   public
     constructor Create(AOwner: TComponent); override;
@@ -124,66 +99,6 @@
 
 implementation
 
-{ TColorStringGrid }
-
-function TColorStringGrid.GetRowFontColor(AIndex: Integer): TColor;
-begin
-  assert(AIndex < Length(FRowFontColor), 'GetRowFontColor');
-  Result := FRowFontColor[AIndex];
-end;
-
-procedure TColorStringGrid.SetRowFontColor(AIndex: Integer; AValue: TColor);
-begin
-  assert(AIndex < Length(FRowFontColor), 'SetRowFontColor');
-  if FRowFontColor[AIndex] = AValue then
-    exit;
-  FRowFontColor[AIndex] := AValue;
-  Invalidate;
-end;
-
-procedure TColorStringGrid.PrepareCanvas(aCol, aRow: Integer; aState: TGridDrawState);
-begin
-  assert(aRow < Length(FRowFontColor));
-  inherited PrepareCanvas(aCol, aRow, aState);
-  Canvas.Font.Color := FRowFontColor[aRow];
-end;
-
-procedure TColorStringGrid.ColRowDeleted(IsColumn: Boolean; index: Integer);
-begin
-  inherited ColRowDeleted(IsColumn, index);
-  if IsColumn then exit;
-  assert(index < Length(FRowFontColor), 'ColRowDeleted');
-  if index < Length(FRowFontColor) - 1 then
-    move(FRowFontColor[index+1], FRowFontColor[index],
-      (Length(FRowFontColor)-index) * SizeOf(TColor));
-  SetLength(FRowFontColor, Length(FRowFontColor) - 1);
-end;
-
-procedure TColorStringGrid.ColRowInserted(IsColumn: boolean; index: integer);
-begin
-  inherited ColRowInserted(IsColumn, index);
-  if IsColumn then exit;
-  SetLength(FRowFontColor, Length(FRowFontColor) + 1);
-  assert(index < Length(FRowFontColor), 'ColRowInserted');
-  if index < Length(FRowFontColor) - 1 then
-    move(FRowFontColor[index], FRowFontColor[index+1],
-      (Length(FRowFontColor)-index) * SizeOf(TColor));
-  FRowFontColor[index] := Font.Color;
-end;
-
-procedure TColorStringGrid.SizeChanged(OldColCount, OldRowCount: Integer);
-var
-  i: Integer;
-begin
-  inherited SizeChanged(OldColCount, OldRowCount);
-  i := Length(FRowFontColor);
-  SetLength(FRowFontColor, RowCount);
-  while i < RowCount do begin
-    FRowFontColor[i] := Font.Color;
-    inc(i);
-  end;
-end;
-
 {$R *.lfm}
 
 { TEditorMarkupUserDefinedFrame }
@@ -202,6 +117,12 @@
   if key in [#10,#13] then edListNameEditingDone(nil);
 end;
 
+procedure TEditorMarkupUserDefinedFrame.FrameResize(Sender: TObject);
+begin
+  gbKeyBoundMinLen.Width := Width div 2;
+  edListName.Width := (Width div 2) - edListName.Left;
+end;
+
 procedure TEditorMarkupUserDefinedFrame.KeyEditClicked(Sender: TObject);
 var
   i: Integer;
@@ -255,11 +176,6 @@
   UpdateListDisplay;
 end;
 
-procedure TEditorMarkupUserDefinedFrame.tbSelectListClick(Sender: TObject);
-begin
-  tbSelectList.CheckMenuDropdown;
-end;
-
 procedure TEditorMarkupUserDefinedFrame.GeneralCheckBoxChange(Sender: TObject);
 var
   i: PtrInt;
@@ -331,17 +247,6 @@
 
 end;
 
-procedure TEditorMarkupUserDefinedFrame.tbSelectPageClicked(Sender: TObject);
-begin
-  if WordList.EditorMode then
-    WordList.EditingDone;
-
-  if tbMainPage.Down then
-    Notebook1.PageIndex :=  0
-  else
-    Notebook1.PageIndex :=  1;
-end;
-
 procedure TEditorMarkupUserDefinedFrame.WordListColRowDeleted(Sender: TObject;
   IsColumn: Boolean; sIndex, tIndex: Integer);
 begin
@@ -452,7 +357,7 @@
   if WordList.EditorMode then
     WordList.EditingDone;
 
-  FSelectedListIdx := TMenuItem(Sender).Tag;
+  FSelectedListIdx := cbSelectList.ItemIndex;
   UpdateListDisplay;
 end;
 
@@ -551,14 +456,10 @@
   m: TMenuItem;
   i: Integer;
 begin
-  ListMenu.Items.Clear;
+  cbSelectList.Clear;
   if FUserWordsList.Count > 0 then begin
     for i := 0 to FUserWordsList.Count - 1 do begin
-      m := TMenuItem.Create(ListMenu);
-      m.Caption := FUserWordsList.Lists[i].Name;
-      m.Tag := i;
-      m.OnClick := @DoListSelected;
-      ListMenu.Items.Add(m);
+      cbSelectList.Items.add(FUserWordsList.Lists[i].Name);
     end;
   end;
   UpdateListDropDownCaption;
@@ -567,18 +468,27 @@
 procedure TEditorMarkupUserDefinedFrame.UpdateListDropDownCaption;
 begin
   if FUserWordsList.Count = 0 then begin
-    tbSelectList.Enabled := False;
-    tbSelectList.Caption := dlgMarkupUserDefinedNoLists;
+    cbSelectList.Enabled := False;
+    cbSelectList.Text := dlgMarkupUserDefinedNoLists;
   end
   else begin
-    tbSelectList.Enabled := True;
+    cbSelectList.Enabled := True;
     if (FSelectedListIdx >= 0) and (FSelectedListIdx < FUserWordsList.Count) then
-      tbSelectList.Caption := FUserWordsList.Lists[FSelectedListIdx].Name
+      cbSelectList.ItemIndex := FSelectedListIdx
     else
-      tbSelectList.Caption := dlgMarkupUserDefinedNoListsSel;
+      cbSelectList.Text := dlgMarkupUserDefinedNoListsSel;
   end;
+  UpdateListDropDownResize;
 end;
 
+procedure TEditorMarkupUserDefinedFrame.UpdateListDropDownResize;
+begin
+    if cbSelectList.ItemIndex <> -1 then
+      cbSelectList.Width := Canvas.TextWidth(cbSelectList.Items[cbSelectList.ItemIndex]) + 50
+    else
+      cbSelectList.Width := Canvas.TextWidth(cbSelectList.Text) + 50;
+end;
+
 procedure TEditorMarkupUserDefinedFrame.UpdateListDisplay(KeepDuplicates: Boolean);
 var
   i: Integer;
@@ -654,8 +564,8 @@
 begin
   SynColorAttrEditor1.Setup;
   SynColorAttrEditor1.ShowPrior := True;
-  tbNewList.Caption          := dlgMarkupUserDefinedListNew;
-  tbDeleteList.Caption       := dlgMarkupUserDefinedListDel;
+  btnNewList.Caption          := dlgMarkupUserDefinedListNew;
+  btnDeleteList.Caption       := dlgMarkupUserDefinedListDel;
   lbListName.Caption         := dlgMarkupUserDefinedListName;
   tbMainPage.Caption         := dlgMarkupUserDefinedPageMain;
   tbKeyPage.Caption          := dlgMarkupUserDefinedPageKeys;
@@ -662,15 +572,16 @@
   cbCaseSense.Caption        := dlgMarkupUserDefinedMatchCase;
   cbMatchStartBound.Caption  := dlgMarkupUserDefinedMatchStartBound;
   cbMatchEndBound.Caption    := dlgMarkupUserDefinedMatchEndBound;
-  divKeyAdd.Caption          := dlgMarkupUserDefinedDivKeyAdd;
-  divKeyRemove.Caption       := dlgMarkupUserDefinedDivKeyRemove;
-  divKeyToggle.Caption       := dlgMarkupUserDefinedDivKeyToggle;
+  gbKeyAdd.Caption           := dlgMarkupUserDefinedDivKeyAdd;
+  gbKeyRemove.Caption        := dlgMarkupUserDefinedDivKeyRemove;
+  gbKeyToggle.Caption        := dlgMarkupUserDefinedDivKeyToggle;
+  gbListColorFont.Caption    := dlgColors;
 
   lbNewKeyOptions.Caption    := dlgMarkupUserDefinedNewByKeyOpts;
   cbKeyCase.Caption          := dlgMarkupUserDefinedMatchCase;
   cbKeyBoundStart.Caption    := dlgMarkupUserDefinedMatchStartBound;
   cbKeyBoundEnd.Caption      := dlgMarkupUserDefinedMatchEndBound;
-  lbKeyBoundMinLen.Caption   := dlgMarkupUserDefinedNewByKeyLen;
+  gbKeyBoundMinLen.Caption   := dlgMarkupUserDefinedNewByKeyLen;
   lbWordMin.Caption          := dlgMarkupUserDefinedNewByKeyLenWord;
   lbSelectMin.Caption        := dlgMarkupUserDefinedNewByKeyLenSelect;
   cbSmartSelectBound.Caption := dlgMarkupUserDefinedNewByKeySmartSelect;
@@ -692,7 +603,7 @@
   FSelectedListIdx := 0;
   UpdateListDropDownFull;
   UpdateListDisplay;
-  tbDeleteList.Enabled := FUserWordsList.Count > 0;
+  btnDeleteList.Enabled := FUserWordsList.Count > 0;
   FGlobalColors := nil;
   UpdateKeys;
 end;
user_defined_markup.patch (60,450 bytes)   

Phemtik

2018-03-21 01:17

reporter  

Phemtik

2018-03-21 01:18

reporter  

Phemtik

2018-03-21 01:33

reporter   ~0107305

Patch almost redesign the user defined markup completely.

removes TColorStringGrid from editor_markup_userdefined.pas and move it to its own file ColorStringGrid.pas under components/lazcontrols.

register TColorStringGrid in LazControlsDsgn with a non-visible component.
No nice opening error anymore.

I Removed the TToolBar and TNotebook.
The Settings moved with an redesign to a TPageControl.
The drop-down list ToolBarButton was removed with an auto-sizing ComboBox in DropDownList style.

Martin Friebe

2018-06-11 01:44

manager   ~0108820

Last edited: 2018-06-11 01:45

View 2 revisions

Please test with revision 58223. I added some code to enforce the minimum size (58221). As for the spinedits, I increased their min width as they seem not to autosize to content. (58223)

Please re-open if not ok.

--------------
As for the patch. I preferred a solution without the re-design. But thanks for the effort.

Phemtik

2018-06-11 11:52

reporter   ~0108826

Thank you first, for correcting the size problem of the Frame.

I don't now if it's the right place for that and maybe I should open a new issue report, but I make the redesign also, because it break the user-experience of the Lazarus ide.
If I compare it with other menu's, it is not following the design and it abuse controls for a function, where we have controls specifically made for, without real need.

Martin Friebe

2018-06-11 12:10

manager   ~0108827

commenting to a closed issue (without reopening) can easily be lost (lucky, I spotted this one)

Yes in this case it would be a new issue. (design change).

But it would be best to discuss first (forum / mail list).

Phemtik

2018-06-11 12:17

reporter   ~0108829

Thank you.

So closed for this particular issue.

Issue History

Date Modified Username Field Change
2018-03-16 10:42 Phemtik New Issue
2018-03-16 10:42 Phemtik File Added: IDE-Options--UserDefinedMarkup.png
2018-03-21 01:17 Phemtik File Added: user_defined_markup.patch
2018-03-21 01:17 Phemtik File Added: IDE-Options--UserDefinedMarkup_GTK.png
2018-03-21 01:18 Phemtik File Added: IDE-Options--UserDefinedMarkup_Windows.png
2018-03-21 01:33 Phemtik Note Added: 0107305
2018-03-21 01:46 Martin Friebe Assigned To => Martin Friebe
2018-03-21 01:46 Martin Friebe Status new => assigned
2018-06-10 20:55 Juha Manninen Relationship added related to 0033843
2018-06-11 01:44 Martin Friebe LazTarget => -
2018-06-11 01:44 Martin Friebe Note Added: 0108820
2018-06-11 01:44 Martin Friebe Status assigned => resolved
2018-06-11 01:44 Martin Friebe Resolution open => fixed
2018-06-11 01:45 Martin Friebe Note Edited: 0108820 View Revisions
2018-06-11 02:00 Martin Friebe Fixed in Revision => 58223
2018-06-11 02:00 Martin Friebe LazTarget - => 1.0.10
2018-06-11 02:00 Martin Friebe Fixed in Version => 1.10
2018-06-11 02:00 Martin Friebe Target Version => 1.10
2018-06-11 11:52 Phemtik Note Added: 0108826
2018-06-11 12:10 Martin Friebe Note Added: 0108827
2018-06-11 12:17 Phemtik Note Added: 0108829
2018-06-11 12:17 Phemtik Status resolved => closed