mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-16 11:42:12 +08:00
Display help text for SQL function as tooltip hint in query helpers tree.
This commit is contained in:
@ -7785,19 +7785,38 @@ procedure TMainForm.AnyGridGetHint(Sender: TBaseVirtualTree; Node:
|
|||||||
TVTTooltipLineBreakStyle; var HintText: String);
|
TVTTooltipLineBreakStyle; var HintText: String);
|
||||||
var
|
var
|
||||||
Tree: TVirtualStringTree;
|
Tree: TVirtualStringTree;
|
||||||
|
NewHint: String;
|
||||||
begin
|
begin
|
||||||
// Disable tooltips on Wine, as they prevent users from clicking + editing clipped cells
|
// Disable tooltips on Wine, as they prevent users from clicking + editing clipped cells
|
||||||
if not FIsWine then begin
|
if FIsWine then
|
||||||
|
Exit;
|
||||||
|
|
||||||
Tree := TVirtualStringTree(Sender);
|
Tree := TVirtualStringTree(Sender);
|
||||||
|
|
||||||
|
if Tree = ActiveQueryHelpers then begin
|
||||||
|
case Sender.GetNodeLevel(Node) of
|
||||||
|
1: case Node.Parent.Index of
|
||||||
|
HELPERNODE_FUNCTIONS: begin
|
||||||
|
NewHint := MySQLFunctions[Node.Index].Name + MySQLFunctions[Node.Index].Declaration +
|
||||||
|
':' + sLineBreak + MySQLFunctions[Node.Index].Description;
|
||||||
|
if not NewHint.IsEmpty then begin
|
||||||
|
HintText := NewHint;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if HintText.IsEmpty then begin
|
||||||
HintText := Tree.Text[Node, Column];
|
HintText := Tree.Text[Node, Column];
|
||||||
HintText := sstr(HintText, SIZE_KB);
|
HintText := sstr(HintText, SIZE_KB);
|
||||||
|
end;
|
||||||
// See http://www.heidisql.com/forum.php?t=20458#p20548
|
// See http://www.heidisql.com/forum.php?t=20458#p20548
|
||||||
if Sender = DBtree then
|
if Sender = DBtree then
|
||||||
LineBreakStyle := hlbForceSingleLine
|
LineBreakStyle := hlbForceSingleLine
|
||||||
else
|
else
|
||||||
LineBreakStyle := hlbForceMultiLine;
|
LineBreakStyle := hlbForceMultiLine;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TMainForm.actLogHorizontalScrollbarExecute(Sender: TObject);
|
procedure TMainForm.actLogHorizontalScrollbarExecute(Sender: TObject);
|
||||||
|
Reference in New Issue
Block a user