mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 04:58:11 +02:00
fixed reading empty stream and TCustomRadioGroup.ItemsChanged
git-svn-id: trunk@4391 -
This commit is contained in:
parent
991c3e7ba5
commit
173fcfe148
@ -426,26 +426,26 @@ type
|
||||
FColumns : integer;
|
||||
FReading : boolean;
|
||||
FOnClick : TNotifyEvent;
|
||||
procedure ItemsChanged (Sender : TObject);
|
||||
procedure Clicked(Sender : TObject); virtual;
|
||||
procedure ItemsChanged(Sender: TObject);
|
||||
procedure Clicked(Sender: TObject); virtual;
|
||||
procedure DoPositionButtons;
|
||||
protected
|
||||
procedure UpdateRadioButtonStates;
|
||||
procedure ReadState(Reader: TReader); override;
|
||||
procedure SetItem (value : TStrings);
|
||||
procedure SetColumns (value : integer);
|
||||
procedure SetItemIndex (value : integer);
|
||||
function GetItemIndex : integer;
|
||||
procedure SetItem(Value: TStrings);
|
||||
procedure SetColumns(Value: integer);
|
||||
procedure SetItemIndex(Value: integer);
|
||||
function GetItemIndex: integer;
|
||||
procedure WMSize(var Message: TLMSize); message LM_SIZE;
|
||||
protected
|
||||
property ItemIndex : integer read GetItemIndex write SetItemIndex default -1;
|
||||
property Items : TStrings read FItems write SetItem;
|
||||
property Columns : integer read FColumns write SetColumns default 1;
|
||||
property OnClick : TNotifyEvent read FOnClick write FOnClick;
|
||||
property ItemIndex: integer read GetItemIndex write SetItemIndex default -1;
|
||||
property Items: TStrings read FItems write SetItem;
|
||||
property Columns: integer read FColumns write SetColumns default 1;
|
||||
property OnClick: TNotifyEvent read FOnClick write FOnClick;
|
||||
public
|
||||
constructor Create (AOwner : TComponent); override;
|
||||
destructor Destroy; override;
|
||||
function CanModify : boolean; virtual;
|
||||
function CanModify: boolean; virtual;
|
||||
procedure CreateWnd; override;
|
||||
function Rows: integer;
|
||||
end;
|
||||
@ -753,6 +753,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.67 2003/07/10 15:17:43 mattias
|
||||
fixed reading empty stream and TCustomRadioGroup.ItemsChanged
|
||||
|
||||
Revision 1.66 2002/08/19 15:15:23 mattias
|
||||
implemented TPairSplitter
|
||||
|
||||
|
@ -63,7 +63,7 @@ begin
|
||||
ControlStyle := ControlStyle + [csCaptureMouse, csClickEvents, csSetCaption,
|
||||
csDoubleClicks];
|
||||
FItems := TStringList.Create;
|
||||
TStringList(FItems).OnChanging := @ItemsChanged;
|
||||
//TStringList(FItems).OnChanging := @ItemsChanged;
|
||||
TStringList(FItems).OnChange := @ItemsChanged;
|
||||
FItemIndex := -1;
|
||||
FButtonList := TList.Create;
|
||||
@ -174,13 +174,10 @@ end;
|
||||
Params: sender : object calling this proc. (in fact the FItems instance)
|
||||
Returns: Nothing
|
||||
|
||||
Set the FColumns property which determines the no columns in
|
||||
which the radiobuttons should be arranged.
|
||||
Range: 1 .. ???
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomRadioGroup.ItemsChanged (Sender : TObject);
|
||||
begin
|
||||
if HandleAllocated and (csLoading in ComponentState) then
|
||||
if HandleAllocated and (not (csLoading in ComponentState)) then
|
||||
RecreateWnd;
|
||||
OwnerFormDesignerModified(Self);
|
||||
end;
|
||||
@ -380,6 +377,9 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.22 2003/07/10 15:17:43 mattias
|
||||
fixed reading empty stream and TCustomRadioGroup.ItemsChanged
|
||||
|
||||
Revision 1.21 2003/06/19 09:26:58 mattias
|
||||
fixed changing unitname during update
|
||||
|
||||
|
@ -67,7 +67,7 @@ function LFMtoLRSfile(LFMfilename:ansistring):boolean;
|
||||
// returns true if successful
|
||||
function LFMtoLRSstream(LFMStream,LFCStream:TStream):boolean;
|
||||
// returns true if successful
|
||||
function FindLFMClassName(LFMStream:TStream):AnsiString;
|
||||
function FindLFMClassName(LFMStream: TStream):AnsiString;
|
||||
function CreateLFMFile(AComponent: TComponent; LFMStream: TStream): integer;
|
||||
|
||||
type
|
||||
@ -195,7 +195,7 @@ begin
|
||||
// remember last non identifier char position
|
||||
if (not (c in ['a'..'z','A'..'Z','0'..'9','_'])) then
|
||||
StartPos:=LFMStream.Position;
|
||||
LFMStream.Read(c,1);
|
||||
if LFMStream.Read(c,1)<>1 then exit;
|
||||
if LFMStream.Position>1000 then exit;
|
||||
until c in [#10,#13];
|
||||
if StartPos<0 then exit;
|
||||
|
Loading…
Reference in New Issue
Block a user