mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 11:16:12 +02:00
fixed TRadioGroup.ItemIndex=-1
git-svn-id: trunk@2210 -
This commit is contained in:
parent
3183834fce
commit
20c16133bf
@ -6685,12 +6685,51 @@ begin
|
||||
{$EndIf}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function TgtkObject.SetProp(Handle: hwnd; Str : PChar;
|
||||
Data : Pointer) : Boolean;
|
||||
------------------------------------------------------------------------------}
|
||||
Function TgtkObject.SetProp(Handle: hwnd; Str : PChar; Data : Pointer) : Boolean;
|
||||
Begin
|
||||
gtk_object_set_data(pGTKObject(handle),Str,data);
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function TgtkObject.SetRadioButtonGroupMode(Handle: hWnd;
|
||||
AutoGroup: boolean): Boolean;
|
||||
------------------------------------------------------------------------------}
|
||||
function TgtkObject.SetRadioButtonGroupMode(Handle: hWnd;
|
||||
AutoGroup: boolean): Boolean;
|
||||
var
|
||||
NewGroup: PGSList;
|
||||
LCLObject: TObject;
|
||||
Parent: TWinControl;
|
||||
i: Integer;
|
||||
begin
|
||||
Result:=false;
|
||||
NewGroup:=nil;
|
||||
if AutoGroup then begin
|
||||
// search another radiobutton with the same parent
|
||||
LCLObject:=GetLCLObject(PGtkWidget(Handle));
|
||||
if not (LCLObject is TRadioButton) then exit;
|
||||
Parent:=TRadioButton(LCLObject).Parent;
|
||||
if Parent<>nil then begin
|
||||
for i:=0 to Parent.ComponentCount-1 do begin
|
||||
if (not (Parent.Components[i] is TRadioButton))
|
||||
or (not (TRadioButton(Parent.Components[i]).HandleAllocated))
|
||||
then
|
||||
continue;
|
||||
NewGroup:=
|
||||
PGtkRadioButton(TRadioButton(Parent.Components[i]).Handle)^.Group;
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
gtk_radio_button_set_group(PGtkRadioButton(Handle),NewGroup);
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function: SetScrollInfo
|
||||
Params: none
|
||||
@ -7930,6 +7969,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.219 2003/03/17 20:50:30 mattias
|
||||
fixed TRadioGroup.ItemIndex=-1
|
||||
|
||||
Revision 1.218 2003/03/17 08:51:09 mattias
|
||||
added IsWindowVisible
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user