[Lazarus] VirtualTreeView: Expand/Collapse without OnNodeClick
Balázs Székely
getmem1 at gmail.com
Tue Sep 6 16:33:54 CEST 2016
This should work:
procedure TfMain.VSTCollapsing(Sender: TBaseVirtualTree; Node: PVirtualNode;
var Allowed: Boolean);
begin
CollapsingOrExapnding := True;
end;
procedure TfMain.VSTExpanding(Sender: TBaseVirtualTree; Node: PVirtualNode;
var Allowed: Boolean);
begin
CollapsingOrExapnding := True;
end;
procedure TfMain.OnNodeClick(Sender: TObject);
begin
if not CollapsingOrExapnding then
begin
//regular node click(not +/- buttons), do something...
ShowMessage('ok')
end
else
CollapsingOrExapnding := False;
end;
--
View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-VirtualTreeView-Expand-Collapse-without-OnNodeClick-tp4049464p4049466.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.
More information about the Lazarus
mailing list