fix #477 - Horizontal scrolling is missing in the Variables view

and add value in hint popup
This commit is contained in:
Basile Burg 2019-06-13 21:19:50 +02:00
parent 329c3adda4
commit a2c73a0d5e
2 changed files with 14 additions and 2 deletions

View File

@ -85,7 +85,6 @@ inherited GdbWidget: TGdbWidget
Top = 31
Width = 509
Align = alClient
AutoWidthLastColumn = True
BorderSpacing.Around = 2
Columns = <
item
@ -105,6 +104,7 @@ inherited GdbWidget: TGdbWidget
SortType = stText
TabOrder = 0
ViewStyle = vsReport
OnShowHint = lstVariablesShowHint
end
object varListFlt: TListViewFilterEdit
Left = 2
@ -352,7 +352,7 @@ inherited GdbWidget: TGdbWidget
end
object button4: TDexedToolButton[2]
Left = 205
Height = 5
Height = 28
Top = 0
AutoSize = True
Caption = 'button4'

View File

@ -473,6 +473,7 @@ type
procedure Edit1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure lstCallStackDblClick(Sender: TObject);
procedure lstThreadsDblClick(Sender: TObject);
procedure lstVariablesShowHint(Sender: TObject; HintInfo: PHintInfo);
procedure mnuEvalDerefClick(Sender: TObject);
procedure mnuEvalCustomClick(Sender: TObject);
procedure mnuEvalSelectedClick(Sender: TObject);
@ -2824,6 +2825,17 @@ begin
doc.CaretY:= lne;
end;
procedure TGdbWidget.lstVariablesShowHint(Sender: TObject; HintInfo: PHintInfo);
var
p: TPoint;
i: TListItem;
begin
p := lstVariables.ScreenToControl(mouse.CursorPos);
i := lstVariables.GetItemAt(p.x, p.y);
if assigned(i) and (i.SubItems.Count > 0) then
HintInfo^.HintStr:= i.SubItems[0];
end;
procedure TGdbWidget.mnuEvalDerefClick(Sender: TObject);
begin
fEvalKind := gekDerefSelectedVar;