mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 23:49:28 +02:00
fixed selection of composite component items
git-svn-id: trunk@7495 -
This commit is contained in:
parent
c7c83312ec
commit
9e904d09dd
@ -2270,6 +2270,7 @@ function TDesigner.ControlClassAtPos(const AClass: TControlClass; const APos: TP
|
||||
Result := TControl(FLookupRoot.Components[i]); // bit tricky, but we set it to nil anyhow
|
||||
if not Result.InheritsFrom(AClass) then Continue;
|
||||
if IgnoreHidden and not ControlIsInDesignerVisible(TControl(Result)) then Continue;
|
||||
if csNoDesignSelectable in Result.ControlStyle then continue;
|
||||
|
||||
Bounds := GetParentFormRelativeBounds(Result);
|
||||
if PtInRect(Bounds, APos) then Exit;
|
||||
@ -2292,6 +2293,7 @@ function TDesigner.ControlClassAtPos(const AClass: TControlClass; const APos: TP
|
||||
Dec(i);
|
||||
Control := WinControl.Controls[i];
|
||||
if IgnoreHidden and (csNoDesignVisible in Control.ControlStyle) then Continue;
|
||||
if csNoDesignSelectable in Control.ControlStyle then continue;
|
||||
Bounds := GetParentFormRelativeBounds(Control);
|
||||
if not PtInRect(Bounds, APos) then Continue;
|
||||
|
||||
|
@ -196,7 +196,8 @@ type
|
||||
csDesignNoSmoothResize, // no WYSIWYG resizing in designer
|
||||
csDesignFixedBounds, // control can not be moved nor resized in designer
|
||||
csHasDefaultAction, // control implements useful ExecuteDefaultAction
|
||||
csHasCancelAction // control implements useful ExecuteCancelAction
|
||||
csHasCancelAction, // control implements useful ExecuteCancelAction
|
||||
csNoDesignSelectable // control can not be selected at design time
|
||||
);
|
||||
TControlStyle = set of TControlStyleType;
|
||||
|
||||
|
@ -459,6 +459,7 @@ begin
|
||||
CheckButtonVisible;
|
||||
FButton.OnClick := @DoButtonClick;
|
||||
FButton.Cursor := crArrow;
|
||||
FButton.ControlStyle := FButton.ControlStyle + [csNoDesignSelectable];
|
||||
ControlStyle := ControlStyle - [csSetCaption];
|
||||
FDirectInput := True;
|
||||
end;
|
||||
|
@ -85,6 +85,7 @@ begin
|
||||
AutoSize := False;
|
||||
Parent := Self;
|
||||
OnClick :=@Clicked;
|
||||
include(ControlStyle, csNoDesignSelectable);
|
||||
end;
|
||||
FButtonList.Add(CheckBox);
|
||||
end;
|
||||
|
@ -113,6 +113,7 @@ begin
|
||||
if FEditLabel<>nil then exit;
|
||||
FEditLabel := TBoundLabel.Create(Self);
|
||||
Include(FEditLabel.ComponentStyle, csSubComponent);
|
||||
Include(FEditLabel.ControlStyle, csNoDesignSelectable);
|
||||
FEditLabel.FreeNotification(Self);
|
||||
FEditLabel.FocusControl := Self;
|
||||
end;
|
||||
|
@ -248,6 +248,7 @@ begin
|
||||
CurButton.Visible:=CurButtonType in FVisibleButtons;
|
||||
CurButton.OnClick:=@ButtonClickHandler;
|
||||
CurButton.Parent:=Self;
|
||||
include(CurButton.ControlStyle, csNoDesignSelectable);
|
||||
if CurButton.Visible then begin
|
||||
inc(ButtonNumber);
|
||||
ButtonStartPos:=ButtonEndPos;
|
||||
|
@ -120,6 +120,7 @@ begin
|
||||
Temp.AutoSize := False;
|
||||
Temp.OnClick := @Clicked;
|
||||
Temp.OnChange := @Changed;
|
||||
include(temp.ControlStyle, csNoDesignSelectable);
|
||||
FButtonList.Add(Temp);
|
||||
end;
|
||||
if FHiddenButton=nil then begin
|
||||
@ -127,6 +128,7 @@ begin
|
||||
with FHiddenButton do begin
|
||||
Name:='HiddenRadioButton';
|
||||
Visible:=false;
|
||||
include(ControlStyle, csNoDesignSelectable);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user