Jump to content
RTollison

virtualstringtree and checkboxes

Recommended Posts

NOTE: Found issue. No replies needed. Except for scolding....

 

I had a project that was working with the VST and checkboxes showing up. i had to move project to a new pc and get the virtual components installed. i can now compile project without errors but lost something along the way. i used this code to add the nodes with a check box:

function AddVSTObject(AVST: TCustomVirtualStringTree; ANode: PVirtualNode; AObject: TObject): PVirtualNode;
var
  Data: PClassRoomData;
begin
  Result:=AVST.AddChild(ANode);
  Result.CheckType := ctTriStateCheckBox;
  AVST.ValidateNode(Result,False);
  Data:=AVST.GetNodeData(Result);
  Data^.FObject:=AObject;
end;

It will display the tree with all the info but the checkboxes do not display. i checked the properties of the vst and found nothing related to checkboxes. so any ideas as to what i could check to get the checkboxes to show up?

Edited by RTollison

Share this post


Link to post

image.png.3bd4ac82ce7c2b97a1b88ad2e6cd0030.png old program shows the checkbox but new compiled program with gui changes not related to tree does not show checkbox

 

image.png.657e70b6aa6743e6780d5e99f0ac3cf7.png

 

Share this post


Link to post

You should be using the AVST.CheckType[ANode] :=  ctTriStateCheckBox property rather than alter the node structure directly otherwise the VTV control cannot perform related functions associated with check boxes.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×