mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 10:35:58 +02:00
fixed changing Index of TStatusPanel
git-svn-id: trunk@6821 -
This commit is contained in:
parent
b5bdb59ab4
commit
d14aee61cb
@ -3460,11 +3460,12 @@ Type
|
||||
procedure RefreshPropertyValues;
|
||||
public
|
||||
procedure FillCollectionListBox;
|
||||
constructor Create(TheOwner: TComponent); Override;
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure SelectInObjectInspector(UnselectAll: boolean);
|
||||
procedure SetCollection(NewCollection: TCollection;
|
||||
NewOwnerPersistent: TPersistent; const NewPropName: string);
|
||||
procedure Modified;
|
||||
public
|
||||
property Collection: TCollection read FCollection;
|
||||
property OwnerPersistent: TPersistent read FOwnerPersistent;
|
||||
@ -3486,6 +3487,7 @@ begin
|
||||
if Collection=nil then exit;
|
||||
Collection.Add;
|
||||
FillCollectionListBox;
|
||||
Modified;
|
||||
end;
|
||||
|
||||
procedure TCollectionPropertyEditorForm.DeleteClick(Sender: TObject);
|
||||
@ -3527,6 +3529,7 @@ begin
|
||||
CollectionListBox.ItemIndex:=NewItemIndex;
|
||||
SelectInObjectInspector(false);
|
||||
end;
|
||||
Modified;
|
||||
end;
|
||||
end;
|
||||
UpdateButtons;
|
||||
@ -3542,6 +3545,7 @@ begin
|
||||
Collection.Items[i].Index:=i+1;
|
||||
CollectionListBox.ItemIndex:=i+1;
|
||||
FillCollectionListBox;
|
||||
Modified;
|
||||
end;
|
||||
|
||||
procedure TCollectionPropertyEditorForm.MoveUpButtonClick(Sender: TObject);
|
||||
@ -3554,6 +3558,7 @@ begin
|
||||
Collection.Items[i].Index:=i-1;
|
||||
CollectionListBox.ItemIndex:=i-1;
|
||||
FillCollectionListBox;
|
||||
Modified;
|
||||
end;
|
||||
|
||||
procedure TCollectionPropertyEditorForm.UpdateCaption;
|
||||
@ -3760,6 +3765,11 @@ begin
|
||||
FillCollectionListBox;
|
||||
end;
|
||||
|
||||
procedure TCollectionPropertyEditorForm.Modified;
|
||||
begin
|
||||
GlobalDesignHook.Modified(Self);
|
||||
end;
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
function TCollectionPropertyEditor.ReadElement(Index: integer): TPersistent;
|
||||
|
@ -59,6 +59,8 @@ type
|
||||
);
|
||||
TPanelParts = set of TPanelPart;
|
||||
|
||||
{ TStatusPanel }
|
||||
|
||||
TStatusPanel = class(TCollectionItem)
|
||||
private
|
||||
FText: string;
|
||||
@ -75,6 +77,7 @@ type
|
||||
protected
|
||||
function GetDisplayName: string; override;
|
||||
procedure PanelChanged(const Parts: TPanelParts);
|
||||
procedure SetIndex(Value: Integer); override;
|
||||
public
|
||||
constructor Create(aCollection: TCollection); override;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
@ -2300,6 +2303,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.164 2005/02/21 01:08:19 mattias
|
||||
fixed changing Index of TStatusPanel
|
||||
|
||||
Revision 1.163 2005/02/17 18:56:32 mattias
|
||||
line ends in debug output are now converted, added TTreeNode.FindNode
|
||||
|
||||
|
@ -62,6 +62,20 @@ begin
|
||||
TheStatusBar.InvalidatePanel(Index,Parts);
|
||||
end;
|
||||
|
||||
procedure TStatusPanel.SetIndex(Value: Integer);
|
||||
var
|
||||
OldIndex: LongInt;
|
||||
TheStatusBar: TStatusBar;
|
||||
begin
|
||||
OldIndex:=Index;
|
||||
if OldIndex=Value then exit;
|
||||
//debugln('TStatusPanel.SetIndex A Test=',Text,' Old=',dbgs(OldIndex),' New=',dbgs(Value));
|
||||
inherited SetIndex(Value);
|
||||
TheStatusBar:=StatusBar;
|
||||
if TheStatusBar=nil then exit;
|
||||
TheStatusBar.InvalidatePanel(-1,[ppText]);
|
||||
end;
|
||||
|
||||
procedure TStatusPanel.SetAlignment(Value: TAlignment);
|
||||
begin
|
||||
if FAlignment <> Value then
|
||||
|
@ -9,21 +9,21 @@
|
||||
<SaveOnlyProjectUnits Value="True"/>
|
||||
</Flags>
|
||||
<MainUnit Value="0"/>
|
||||
<ActiveEditorIndexAtStart Value="1"/>
|
||||
<ActiveEditorIndexAtStart Value="2"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=""/>
|
||||
<Title Value="test2_1buttonnavigation"/>
|
||||
</General>
|
||||
<Units Count="1">
|
||||
<Unit0>
|
||||
<CursorPos X="30" Y="25"/>
|
||||
<CursorPos X="13" Y="23"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<Filename Value="test2_1buttonnavigation.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<Loaded Value="True"/>
|
||||
<TopLine Value="1"/>
|
||||
<UnitName Value="test2_1buttonnavigation"/>
|
||||
<UsageCount Value="44"/>
|
||||
<UsageCount Value="72"/>
|
||||
</Unit0>
|
||||
</Units>
|
||||
<PublishOptions>
|
||||
|
@ -22,7 +22,7 @@ program test2_1buttonnavigation;
|
||||
|
||||
uses
|
||||
Interfaces, FPCAdds, LCLProc, LCLType, Classes, Controls, Forms, TypInfo,
|
||||
LMessages, Buttons, xinerama;
|
||||
LMessages, Buttons;
|
||||
|
||||
type
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user