mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 03:01:07 +08:00
Issue #75: pimp up context menu for indexes tab, and assign to foreign keys tab and check constraints tab as well
This commit is contained in:
@ -372,6 +372,7 @@ type
|
||||
function ProcessExists(pid: Cardinal; ExeNamePattern: String): Boolean;
|
||||
procedure ToggleCheckBoxWithoutClick(chk: TCheckBox; State: Boolean);
|
||||
function SynCompletionProposalPrettyText(ImageIndex: Integer; LeftText, CenterText, RightText: String; LeftColor: TColor=-1; CenterColor: TColor=-1; RightColor: TColor=-1): String;
|
||||
function PopupComponent(Sender: TObject): TComponent;
|
||||
|
||||
var
|
||||
AppSettings: TAppSettings;
|
||||
@ -2892,6 +2893,21 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function PopupComponent(Sender: TObject): TComponent;
|
||||
var
|
||||
ParentMenu: TMenu;
|
||||
begin
|
||||
// Return owner component of clicked menu item
|
||||
Result := nil;
|
||||
if not (Sender is TMenuItem) then
|
||||
Exit;
|
||||
ParentMenu := (Sender as TMenuItem).GetParentMenu;
|
||||
if not (ParentMenu is TPopupMenu) then
|
||||
Exit;
|
||||
Result := (ParentMenu as TPopupMenu).PopupComponent;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ Threading stuff }
|
||||
|
||||
|
Reference in New Issue
Block a user