mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-11-03 23:59:32 +01:00 
			
		
		
		
	fixed fpc 2.3 compilation (assigning to set or record properties)
git-svn-id: trunk@11078 -
This commit is contained in:
		
							parent
							
								
									051e47f08a
								
							
						
					
					
						commit
						370aa4c253
					
				@ -258,14 +258,16 @@ procedure TCodeToolsOptions.LoadFromXMLConfig(XMLConfig: TXMLConfig;
 | 
			
		||||
  const Path: string);
 | 
			
		||||
var
 | 
			
		||||
  i: Integer;
 | 
			
		||||
  UnitPath: string;
 | 
			
		||||
begin
 | 
			
		||||
  FPCOptions:=XMLConfig.GetValue(Path+'FPC/Options/Value','');
 | 
			
		||||
  FPCPath:=XMLConfig.GetValue(Path+'FPC/CompilerPath/Value','');
 | 
			
		||||
  FPCSrcDir:=XMLConfig.GetValue(Path+'FPC/SrcDir/Value','');
 | 
			
		||||
  FPCUnitPath:=XMLConfig.GetValue(Path+'FPC/UnitPath/Value','');
 | 
			
		||||
  for i:=1 to length(FPCUnitPath) do
 | 
			
		||||
    if (FPCUnitPath[i] in [#0..#8,#10..#31]) then
 | 
			
		||||
      FPCUnitPath[i]:=';';
 | 
			
		||||
  UnitPath:=XMLConfig.GetValue(Path+'FPC/UnitPath/Value','');
 | 
			
		||||
  for i:=1 to length(UnitPath) do
 | 
			
		||||
    if (UnitPath[i] in [#0..#8,#10..#31]) then
 | 
			
		||||
      UnitPath[i]:=';';
 | 
			
		||||
  FPCUnitPath:=UnitPath;
 | 
			
		||||
  TargetOS:=XMLConfig.GetValue(Path+'FPC/TargetOS/Value','');
 | 
			
		||||
  TargetProcessor:=XMLConfig.GetValue(Path+'FPC/TargetProcessor/Value','');
 | 
			
		||||
  PPUExt:=XMLConfig.GetValue(Path+'FPC/PPUExt/Value','');
 | 
			
		||||
 | 
			
		||||
@ -1123,6 +1123,8 @@ end;
 | 
			
		||||
 | 
			
		||||
procedure TIdentCompletionTool.InitCollectIdentifiers(
 | 
			
		||||
  const CursorPos: TCodeXYPosition; var IdentifierList: TIdentifierList);
 | 
			
		||||
var
 | 
			
		||||
  StartContext: TFindContext;
 | 
			
		||||
begin
 | 
			
		||||
  if IdentifierList=nil then IdentifierList:=TIdentifierList.Create;
 | 
			
		||||
  CurrentIdentifierList:=IdentifierList;
 | 
			
		||||
@ -1130,12 +1132,16 @@ begin
 | 
			
		||||
  LastGatheredIdentParent:=nil;
 | 
			
		||||
  LastGatheredIdentLevel:=0;
 | 
			
		||||
  CurrentIdentifierList.StartContextPos:=CursorPos;
 | 
			
		||||
  CurrentIdentifierList.StartContext.Tool:=Self;
 | 
			
		||||
  StartContext := CurrentIdentifierList.StartContext;
 | 
			
		||||
  StartContext.Tool := Self;
 | 
			
		||||
  CurrentIdentifierList.StartContext:=StartContext;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TIdentCompletionTool.ParseSourceTillCollectionStart(
 | 
			
		||||
  const CursorPos: TCodeXYPosition; out CleanCursorPos: integer;
 | 
			
		||||
  out CursorNode: TCodeTreeNode; out IdentStartPos, IdentEndPos: integer);
 | 
			
		||||
var
 | 
			
		||||
  StartContext: TFindContext;
 | 
			
		||||
begin
 | 
			
		||||
  CleanCursorPos:=0;
 | 
			
		||||
  CursorNode:=nil;
 | 
			
		||||
@ -1151,8 +1157,11 @@ begin
 | 
			
		||||
 | 
			
		||||
  // find node at position
 | 
			
		||||
  CursorNode:=FindDeepestExpandedNodeAtPos(CleanCursorPos,true);
 | 
			
		||||
  if CurrentIdentifierList<>nil then
 | 
			
		||||
    CurrentIdentifierList.StartContext.Node:=CursorNode;
 | 
			
		||||
  if CurrentIdentifierList<>nil then begin
 | 
			
		||||
    StartContext:=CurrentIdentifierList.StartContext;
 | 
			
		||||
    StartContext.Node:=CursorNode;
 | 
			
		||||
    CurrentIdentifierList.StartContext:=StartContext;
 | 
			
		||||
  end;
 | 
			
		||||
  
 | 
			
		||||
  // get identifier position
 | 
			
		||||
  GetIdentStartEndAtPosition(Src,CleanCursorPos,IdentStartPos,IdentEndPos);
 | 
			
		||||
 | 
			
		||||
@ -779,7 +779,7 @@ begin
 | 
			
		||||
  {$IFDEF VerboseFormEditor}
 | 
			
		||||
  writeln('TComponentInterface.Delete A ',Component.Name,':',Component.ClassName);
 | 
			
		||||
  {$ENDIF}
 | 
			
		||||
  Result:=TryFreeComponent(component);
 | 
			
		||||
  Result:=TryFreeComponent(FComponent);
 | 
			
		||||
  {$IFDEF VerboseFormEditor}
 | 
			
		||||
  writeln('TComponentInterface.Delete B ');
 | 
			
		||||
  {$ENDIF}
 | 
			
		||||
 | 
			
		||||
@ -437,9 +437,12 @@ begin
 | 
			
		||||
  fOptions.Key:=EditorKeyStringToVKCode(KeyComboBox.Text);
 | 
			
		||||
  fOptions.Shift:=[];
 | 
			
		||||
  if fOptions.Key<>VK_UNKNOWN then begin
 | 
			
		||||
    if KeyCtrlCheckBox.Checked then include(fOptions.Shift,ssCtrl);
 | 
			
		||||
    if KeyAltCheckBox.Checked then include(fOptions.Shift,ssAlt);
 | 
			
		||||
    if KeyShiftCheckBox.Checked then include(fOptions.Shift,ssShift);
 | 
			
		||||
    if KeyCtrlCheckBox.Checked then
 | 
			
		||||
      fOptions.Shift := fOptions.Shift + [ssCtrl];
 | 
			
		||||
    if KeyAltCheckBox.Checked then
 | 
			
		||||
      fOptions.Shift := fOptions.Shift + [ssAlt];
 | 
			
		||||
    if KeyShiftCheckBox.Checked then
 | 
			
		||||
      fOptions.Shift := fOptions.Shift + [ssShift];
 | 
			
		||||
  end;
 | 
			
		||||
  fOptions.ScanOutputForFPCMessages:=
 | 
			
		||||
    OptionScanOutputForFPCMessagesCheckBox.Checked;
 | 
			
		||||
 | 
			
		||||
@ -222,6 +222,7 @@ type
 | 
			
		||||
    // filedialog
 | 
			
		||||
    procedure ApplyFileDialogSettings(DestDialog: TFileDialog);
 | 
			
		||||
    procedure StoreFileDialogSettings(SourceDialog: TFileDialog);
 | 
			
		||||
    procedure SetFileDialogSettingsInitialDir(const InitialDir: string);
 | 
			
		||||
    function SelectDirectory(const Title: string;
 | 
			
		||||
                             MustExist: boolean = true;
 | 
			
		||||
                             const InitialDir: string = '';
 | 
			
		||||
@ -590,6 +591,11 @@ begin
 | 
			
		||||
                    FFileDialogSettings.MaxHistory);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TInputHistories.SetFileDialogSettingsInitialDir(const InitialDir: string);
 | 
			
		||||
begin
 | 
			
		||||
  FFileDialogSettings.InitialDir := InitialDir;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
function TInputHistories.SelectDirectory(const Title: string;
 | 
			
		||||
  MustExist: boolean; const InitialDir: string;
 | 
			
		||||
  const Directory: string): string;
 | 
			
		||||
 | 
			
		||||
@ -7051,7 +7051,7 @@ begin
 | 
			
		||||
  // search file in path (search especially for pascal files)
 | 
			
		||||
  if FindFile(FName,SPath) then begin
 | 
			
		||||
    Result:=mrOk;
 | 
			
		||||
    InputHistories.FileDialogSettings.InitialDir:=ExtractFilePath(FName);
 | 
			
		||||
    InputHistories.SetFileDialogSettingsInitialDir(ExtractFilePath(FName));
 | 
			
		||||
    if DoOpenEditorFile(FName,-1,[ofAddToRecent])=mrOk then begin
 | 
			
		||||
      // success
 | 
			
		||||
    end;
 | 
			
		||||
 | 
			
		||||
@ -55,6 +55,7 @@ type
 | 
			
		||||
    FLineNumber: integer;
 | 
			
		||||
    FNode: TAVLTreeNode;
 | 
			
		||||
  public
 | 
			
		||||
    procedure UpdateSourcePosition;
 | 
			
		||||
    property Node: TAVLTreeNode read FNode write FNode;
 | 
			
		||||
    property Filename: string read FFilename write FFilename;
 | 
			
		||||
    property LineNumber: integer read FLineNumber write FLineNumber;
 | 
			
		||||
@ -630,7 +631,7 @@ begin
 | 
			
		||||
      Line.LineNumber:=FirstLine;
 | 
			
		||||
    end else begin
 | 
			
		||||
      // line moved
 | 
			
		||||
      inc(Line.LineNumber,LineCount);
 | 
			
		||||
      Line.LineNumber:= Line.LineNumber+LineCount;
 | 
			
		||||
    end;
 | 
			
		||||
    if OldLineNumber<>Line.LineNumber then begin
 | 
			
		||||
      // update line number
 | 
			
		||||
@ -1050,7 +1051,7 @@ begin
 | 
			
		||||
    FSrcPositions.Delete(Line.Node);
 | 
			
		||||
    Line.Node:=nil;
 | 
			
		||||
  end;
 | 
			
		||||
  Line.GetSourcePosition(Line.Filename,Line.LineNumber,Line.Column);
 | 
			
		||||
  Line.UpdateSourcePosition;
 | 
			
		||||
  if Line.LineNumber>0 then
 | 
			
		||||
    Line.Node:=FSrcPositions.Add(Line);
 | 
			
		||||
end;
 | 
			
		||||
@ -1123,6 +1124,13 @@ begin
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{ TLazMessageLine }
 | 
			
		||||
 | 
			
		||||
procedure TLazMessageLine.UpdateSourcePosition;
 | 
			
		||||
begin
 | 
			
		||||
  GetSourcePosition(FFilename, FLineNumber, FColumn);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
initialization
 | 
			
		||||
  MessagesView := nil;
 | 
			
		||||
  {$I msgview.lrs}
 | 
			
		||||
 | 
			
		||||
@ -1051,8 +1051,8 @@ begin
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  // session data
 | 
			
		||||
  CursorPos.X:=XMLConfig.GetValue(Path+'CursorPos/X',-1);
 | 
			
		||||
  CursorPos.Y:=XMLConfig.GetValue(Path+'CursorPos/Y',-1);
 | 
			
		||||
  CursorPos:=Point(XMLConfig.GetValue(Path+'CursorPos/X',-1),
 | 
			
		||||
                   XMLConfig.GetValue(Path+'CursorPos/Y',-1));
 | 
			
		||||
  EditorIndex:=XMLConfig.GetValue(Path+'EditorIndex/Value',-1);
 | 
			
		||||
 | 
			
		||||
  Loaded:=XMLConfig.GetValue(Path+'Loaded/Value',false);
 | 
			
		||||
 | 
			
		||||
@ -333,8 +333,8 @@ procedure TProjectBookmark.LoadFromXMLConfig(XMLConfig: TXMLConfig;
 | 
			
		||||
  const Path: string);
 | 
			
		||||
begin
 | 
			
		||||
  ID:=XMLConfig.GetValue(Path+'ID',-1);
 | 
			
		||||
  CursorPos.X:=XMLConfig.GetValue(Path+'CursorPosX',0);
 | 
			
		||||
  CursorPos.Y:=XMLConfig.GetValue(Path+'CursorPosY',0);
 | 
			
		||||
  CursorPos:=Point(XMLConfig.GetValue(Path+'CursorPosX',0),
 | 
			
		||||
                  XMLConfig.GetValue(Path+'CursorPosY',0));
 | 
			
		||||
  EditorIndex:=XMLConfig.GetValue(Path+'EditorIndex',-1);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -106,7 +106,7 @@ type
 | 
			
		||||
    procedure BeginUpdate;
 | 
			
		||||
    procedure EndUpdate;
 | 
			
		||||
    procedure ShortenPaths;
 | 
			
		||||
    procedure FreeObjects(var slItems: TStrings);
 | 
			
		||||
    procedure FreeObjects(slItems: TStrings);
 | 
			
		||||
    function BeautifyLine(const Filename: string; X, Y: integer;
 | 
			
		||||
                          const Line: string): string;
 | 
			
		||||
    function BeautifyLine(SearchPos: TLazSearchMatchPos): string;
 | 
			
		||||
@ -218,7 +218,7 @@ procedure TSearchResultsView.Form1Create(Sender: TObject);
 | 
			
		||||
var
 | 
			
		||||
  ALayout: TIDEWindowLayout;
 | 
			
		||||
begin
 | 
			
		||||
  FMaxItems:=500;
 | 
			
		||||
  FMaxItems:=50000;
 | 
			
		||||
  
 | 
			
		||||
  ResultsNoteBook.Options:= ResultsNoteBook.Options+[nboShowCloseButtons];
 | 
			
		||||
  ResultsNoteBook.Update;
 | 
			
		||||
@ -1123,7 +1123,7 @@ begin
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TLazSearchResultLB.FreeObjects(var slItems: TStrings);
 | 
			
		||||
procedure TLazSearchResultLB.FreeObjects(slItems: TStrings);
 | 
			
		||||
var i: Integer;
 | 
			
		||||
begin
 | 
			
		||||
 if (slItems.Count <= 0) then Exit;
 | 
			
		||||
 | 
			
		||||
@ -326,7 +326,7 @@ begin
 | 
			
		||||
               if AutoIncrementBuild then
 | 
			
		||||
                  begin
 | 
			
		||||
                     { project indicate to use autoincrementbuild }
 | 
			
		||||
                     Inc(BuildNr);
 | 
			
		||||
                     BuildNr := BuildNr + 1;
 | 
			
		||||
                  end;
 | 
			
		||||
               if ProductVersionString = '' then
 | 
			
		||||
                  ProductVersionString := IntToStr(VersionNr) + '.' +
 | 
			
		||||
 | 
			
		||||
@ -236,13 +236,15 @@ end;
 | 
			
		||||
procedure TActStdProp.Add(ActClassType: TClass; HeadLine, ShortCut, Hint: String);
 | 
			
		||||
var
 | 
			
		||||
  ActItem: TActStdPropItem;
 | 
			
		||||
  ActionProperty: TRecActStdProp;
 | 
			
		||||
begin
 | 
			
		||||
  if Assigned(IndexOfClass(ActClassType.ClassName)) then Exit;
 | 
			
		||||
  ActItem := TActStdPropItem.Create;
 | 
			
		||||
  ActItem.ActClassName := ActClassType.ClassName;
 | 
			
		||||
  ActItem.ActionProperty.Caption := HeadLine;
 | 
			
		||||
  ActItem.ActionProperty.ShortCut := TextToShortCut(ShortCut);
 | 
			
		||||
  ActItem.ActionProperty.Hint := Hint;
 | 
			
		||||
  ActionProperty.Caption := HeadLine;
 | 
			
		||||
  ActionProperty.ShortCut := TextToShortCut(ShortCut);
 | 
			
		||||
  ActionProperty.Hint := Hint;
 | 
			
		||||
  ActItem.ActionProperty := ActionProperty;
 | 
			
		||||
  fPropList.Add(ActItem);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2935,7 +2935,7 @@ var
 | 
			
		||||
begin
 | 
			
		||||
  if HasAutomaticColumns then begin
 | 
			
		||||
    G := TCustomDBGrid(Grid);
 | 
			
		||||
    Include(G.GridStatus, gsRemovingAutoColumns);
 | 
			
		||||
    G.GridStatus := G.GridStatus + [gsRemovingAutoColumns];
 | 
			
		||||
    BeginUpdate;
 | 
			
		||||
    try
 | 
			
		||||
      for i:=Count-1 downto 0 do
 | 
			
		||||
@ -2943,7 +2943,7 @@ begin
 | 
			
		||||
          Delete(i);
 | 
			
		||||
    finally
 | 
			
		||||
      EndUpdate;
 | 
			
		||||
      Exclude(G.GridStatus, gsRemovingAutoColumns);
 | 
			
		||||
      G.GridStatus := G.GridStatus - [gsRemovingAutoColumns];
 | 
			
		||||
    end;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
@ -2576,6 +2576,7 @@ end;
 | 
			
		||||
procedure TCustomGrid.PrepareCanvas(aCol, aRow: Integer; aState: TGridDrawState);
 | 
			
		||||
var
 | 
			
		||||
  AColor: TColor;
 | 
			
		||||
  CurrentTextStyle: TTextStyle;
 | 
			
		||||
begin
 | 
			
		||||
  if DefaultDrawing then begin
 | 
			
		||||
    Canvas.Pen.Mode := pmCopy;
 | 
			
		||||
@ -2599,9 +2600,10 @@ begin
 | 
			
		||||
      Canvas.Brush.Color := AColor;
 | 
			
		||||
      SetCanvasFont(GetColumnFont(aCol, gdFixed in aState));
 | 
			
		||||
    end;
 | 
			
		||||
    Canvas.TextStyle := DefaultTextStyle;
 | 
			
		||||
    Canvas.TextStyle.Alignment := GetColumnAlignment(aCol, gdFixed in AState);
 | 
			
		||||
    Canvas.TextStyle.Layout := GetColumnLayout(aCol, gdFixed in AState);
 | 
			
		||||
    CurrentTextStyle := DefaultTextStyle;
 | 
			
		||||
    CurrentTextStyle.Alignment := GetColumnAlignment(aCol, gdFixed in AState);
 | 
			
		||||
    CurrentTextStyle.Layout := GetColumnLayout(aCol, gdFixed in AState);
 | 
			
		||||
    Canvas.TextStyle := CurrentTextStyle;
 | 
			
		||||
  end else begin
 | 
			
		||||
    Canvas.TextStyle := DefaultTextStyle;
 | 
			
		||||
    Canvas.Brush.Color := clWindow;
 | 
			
		||||
@ -4294,7 +4296,7 @@ begin
 | 
			
		||||
 | 
			
		||||
              if not SelectActive then begin
 | 
			
		||||
                FPivot:=FSplitter;
 | 
			
		||||
                Include(GridFlags, gfNeedsSelectActive);
 | 
			
		||||
                GridFlags := GridFlags + [gfNeedsSelectActive];
 | 
			
		||||
                // delay select active until mouse reachs another cell
 | 
			
		||||
              end;
 | 
			
		||||
            end;
 | 
			
		||||
@ -4430,7 +4432,7 @@ begin
 | 
			
		||||
      
 | 
			
		||||
  end;
 | 
			
		||||
  fGridState:=gsNormal;
 | 
			
		||||
  Exclude(GridFlags, gfNeedsSelectActive);
 | 
			
		||||
  GridFlags := GridFlags - [gfNeedsSelectActive];
 | 
			
		||||
  {$IfDef dbgGrid}DebugLn('MouseUP  END  RND=', FloatToStr(Random));{$Endif}
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
@ -4712,9 +4714,9 @@ begin
 | 
			
		||||
          DebugLn('Got TAB, shift=',dbgs(sh));
 | 
			
		||||
          {$endif}
 | 
			
		||||
          if sh then
 | 
			
		||||
            include(GridFlags, gfRevEditorTab)
 | 
			
		||||
            GridFlags := GridFlags + [gfRevEditorTab]
 | 
			
		||||
          else
 | 
			
		||||
            include(GridFlags, gfEditorTab);
 | 
			
		||||
            GridFlags := GridFlags + [gfEditorTab];
 | 
			
		||||
        end;
 | 
			
		||||
      end;
 | 
			
		||||
    VK_LEFT:
 | 
			
		||||
@ -7174,10 +7176,12 @@ var
 | 
			
		||||
  Ts: Tsize;
 | 
			
		||||
  nc: PcellProps;
 | 
			
		||||
  i: integer;
 | 
			
		||||
  TextStyle : TTextStyle;
 | 
			
		||||
begin
 | 
			
		||||
  inherited CalcCellExtent(acol,arow, aRect);
 | 
			
		||||
  S:=Cells[aCol,aRow];
 | 
			
		||||
  if not Canvas.TextStyle.Clipping then begin
 | 
			
		||||
  TextStyle := Canvas.TextStyle;
 | 
			
		||||
  if not TextStyle.Clipping then begin
 | 
			
		||||
  //if not FCellAttr.TextStyle.Clipping then begin
 | 
			
		||||
    // Calcular el numero de celdas necesarias para contener todo
 | 
			
		||||
    // El Texto
 | 
			
		||||
@ -7190,7 +7194,8 @@ begin
 | 
			
		||||
      aRect.Right:=aRect.Right + getColWidths(i);
 | 
			
		||||
    end;
 | 
			
		||||
    //fcellAttr.TextStyle.Clipping:=i<>aCol;
 | 
			
		||||
    Canvas.TextStyle.clipping:=i<>aCol;
 | 
			
		||||
    TextStyle.Clipping:=i<>aCol;
 | 
			
		||||
    Canvas.TextStyle:=TextStyle;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
@ -7394,12 +7399,12 @@ end;
 | 
			
		||||
 | 
			
		||||
procedure TCustomStringGrid.SetEditText(aCol, aRow: Longint; const aValue: string);
 | 
			
		||||
begin
 | 
			
		||||
  Include(GridFlags, gfEditorUpdateLock);
 | 
			
		||||
  GridFlags := GridFlags + [gfEditorUpdateLock];
 | 
			
		||||
  try
 | 
			
		||||
    if Cells[aCol, aRow]<>aValue then
 | 
			
		||||
      Cells[aCol, aRow]:= aValue;
 | 
			
		||||
  finally
 | 
			
		||||
    Exclude(GridFlags, gfEditorUpdateLock);
 | 
			
		||||
    GridFlags := GridFlags - [gfEditorUpdateLock];
 | 
			
		||||
  end;
 | 
			
		||||
  inherited SetEditText(aCol, aRow, aValue);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
@ -117,7 +117,7 @@ begin
 | 
			
		||||
        Parent := Self;
 | 
			
		||||
        OnClick :=@Self.Clicked;
 | 
			
		||||
        ParentFont := true;
 | 
			
		||||
        Include(ControlStyle, csNoDesignSelectable);
 | 
			
		||||
        ControlStyle := ControlStyle + [csNoDesignSelectable];
 | 
			
		||||
      end;
 | 
			
		||||
      FButtonList.Add(CheckBox);
 | 
			
		||||
    end;
 | 
			
		||||
 | 
			
		||||
@ -112,8 +112,7 @@ procedure TCustomLabeledEdit.CreateInternalLabel;
 | 
			
		||||
begin
 | 
			
		||||
  if FEditLabel<>nil then exit;
 | 
			
		||||
  FEditLabel := TBoundLabel.Create(Self);
 | 
			
		||||
  Include(FEditLabel.ComponentStyle, csSubComponent);
 | 
			
		||||
  Include(FEditLabel.ControlStyle, csNoDesignSelectable);
 | 
			
		||||
  FEditLabel.ControlStyle := FEditLabel.ControlStyle + [csNoDesignSelectable];
 | 
			
		||||
  FEditLabel.FreeNotification(Self);
 | 
			
		||||
  FEditLabel.FocusControl := Self;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
@ -375,7 +375,8 @@ procedure TCustomListBox.DrawItem(Index: Integer; ARect: TRect;
 | 
			
		||||
  State: TOwnerDrawState);
 | 
			
		||||
var
 | 
			
		||||
  OldBrushStyle: TBrushStyle;
 | 
			
		||||
  OldTextLayout: TTextLayout;
 | 
			
		||||
  OldTextStyle: TTextStyle;
 | 
			
		||||
  NewTextStyle: TTextStyle;
 | 
			
		||||
begin
 | 
			
		||||
  //DebugLn('TCustomListBox.DrawItem ',DbgSName(Self));
 | 
			
		||||
  if Assigned(FOnDrawItem) then
 | 
			
		||||
@ -385,12 +386,16 @@ begin
 | 
			
		||||
    FCanvas.FillRect(ARect);
 | 
			
		||||
    if (Index>=0) and (Index < Items.Count) then begin
 | 
			
		||||
      OldBrushStyle := FCanvas.Brush.Style;
 | 
			
		||||
      OldTextLayout := FCanvas.TextStyle.Layout;
 | 
			
		||||
      FCanvas.Brush.Style := bsClear;
 | 
			
		||||
      FCanvas.TextStyle.Layout := tlCenter;
 | 
			
		||||
 | 
			
		||||
      OldTextStyle := FCanvas.TextStyle;
 | 
			
		||||
      NewTextStyle := OldTextStyle;
 | 
			
		||||
      NewTextStyle.Layout := tlCenter;
 | 
			
		||||
      FCanvas.TextStyle := NewTextStyle;
 | 
			
		||||
 | 
			
		||||
      FCanvas.TextRect(ARect, ARect.Left+2, ARect.Top, Items[Index]);
 | 
			
		||||
      FCanvas.Brush.Style := OldBrushStyle;
 | 
			
		||||
      FCanvas.TextStyle.Layout:=OldTextLayout;
 | 
			
		||||
      FCanvas.TextStyle := OldTextStyle;
 | 
			
		||||
    end;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
@ -268,7 +268,7 @@ begin
 | 
			
		||||
    CurButton.Visible:=CurButtonType in FVisibleButtons;
 | 
			
		||||
    CurButton.OnClick:=@ButtonClickHandler;
 | 
			
		||||
    CurButton.Parent:=Self;
 | 
			
		||||
    include(CurButton.ControlStyle, csNoDesignSelectable);
 | 
			
		||||
    CurButton.ControlStyle := CurButton.ControlStyle + [csNoDesignSelectable];
 | 
			
		||||
    if CurButton.Visible then begin
 | 
			
		||||
      inc(ButtonNumber);
 | 
			
		||||
      ButtonStartPos:=ButtonEndPos;
 | 
			
		||||
 | 
			
		||||
@ -159,7 +159,7 @@ begin
 | 
			
		||||
        ParentFont := true;
 | 
			
		||||
        BorderSpacing.CellAlignHorizontal:=ccaLeftTop;
 | 
			
		||||
        BorderSpacing.CellAlignVertical:=ccaCenter;
 | 
			
		||||
        Include(ControlStyle, csNoDesignSelectable);
 | 
			
		||||
        ControlStyle := ControlStyle + [csNoDesignSelectable];
 | 
			
		||||
      end;
 | 
			
		||||
      FButtonList.Add(ARadioButton);
 | 
			
		||||
    end;
 | 
			
		||||
@ -168,7 +168,7 @@ begin
 | 
			
		||||
      with FHiddenButton do begin
 | 
			
		||||
        Name:='HiddenRadioButton';
 | 
			
		||||
        Visible:=false;
 | 
			
		||||
        Include(ControlStyle, csNoDesignSelectable);
 | 
			
		||||
        ControlStyle := ControlStyle + [csNoDesignSelectable];
 | 
			
		||||
      end;
 | 
			
		||||
    end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2825,6 +2825,8 @@ end;
 | 
			
		||||
function TLazPackage.AddFile(const NewFilename, NewUnitName: string;
 | 
			
		||||
  NewFileType: TPkgFileType; NewFlags: TPkgFileFlags;
 | 
			
		||||
  CompPriorityCat: TComponentPriorityCategory): TPkgFile;
 | 
			
		||||
var
 | 
			
		||||
  NewComponentPriority: TComponentPriority;
 | 
			
		||||
begin
 | 
			
		||||
  Result:=FindRemovedPkgFile(NewFilename);
 | 
			
		||||
  if Result=nil then begin
 | 
			
		||||
@ -2839,8 +2841,9 @@ begin
 | 
			
		||||
    UnitName:=NewUnitName;
 | 
			
		||||
    FileType:=NewFileType;
 | 
			
		||||
    Flags:=NewFlags;
 | 
			
		||||
    ComponentPriority:=ComponentPriorityNormal;
 | 
			
		||||
    ComponentPriority.Category:=CompPriorityCat;
 | 
			
		||||
    NewComponentPriority:=ComponentPriorityNormal;
 | 
			
		||||
    NewComponentPriority.Category:=CompPriorityCat;
 | 
			
		||||
    ComponentPriority:=NewComponentPriority;
 | 
			
		||||
    Removed:=false;
 | 
			
		||||
    AutoReferenceSourceDir:=true;
 | 
			
		||||
  end;
 | 
			
		||||
@ -2851,6 +2854,8 @@ end;
 | 
			
		||||
function TLazPackage.AddRemovedFile(const NewFilename, NewUnitName: string;
 | 
			
		||||
  NewFileType: TPkgFileType; NewFlags: TPkgFileFlags;
 | 
			
		||||
  CompPriorityCat: TComponentPriorityCategory): TPkgFile;
 | 
			
		||||
var
 | 
			
		||||
  NewComponentPriority: TComponentPriority;
 | 
			
		||||
begin
 | 
			
		||||
  Result:=FindRemovedPkgFile(NewFilename);
 | 
			
		||||
  if Result=nil then begin
 | 
			
		||||
@ -2862,8 +2867,9 @@ begin
 | 
			
		||||
    UnitName:=NewUnitName;
 | 
			
		||||
    FileType:=NewFileType;
 | 
			
		||||
    Flags:=NewFlags;
 | 
			
		||||
    ComponentPriority:=ComponentPriorityNormal;
 | 
			
		||||
    ComponentPriority.Category:=CompPriorityCat;
 | 
			
		||||
    NewComponentPriority:=ComponentPriorityNormal;
 | 
			
		||||
    NewComponentPriority.Category:=CompPriorityCat;
 | 
			
		||||
    ComponentPriority:=NewComponentPriority;
 | 
			
		||||
    Removed:=false;
 | 
			
		||||
    AutoReferenceSourceDir:=true;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user