Forum > Lazarus Extra Components
VST RootNode
(1/1)
eldonfsr:
Hi I don't knwo what i made wrong at RootNode datas are not saved or i made some wrong.. here is my code...
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- XNode := VSTPL.AddChild(nil); if ( VSTPL.AbsoluteIndex(XNode) > -1 ) then begin Data := VSTPL.GetNodeData(Xnode); Data^.RItem := 'Top'; Data^.RQty := 0; Data^.RPart := FormProdCtrl.SQLQProds.FieldByName('Pnpartnumber').AsString; Data^.RCost := FormProdCtrl.SQLQProds.FieldByName('PnCurrentCost').AsFloat; Data^.RDetail := FormProdCtrl.SQLQProds.FieldByName('PnDetail').AsString; Data^.RTitle := FormProdCtrl.SQLQProds.FieldByName('PnTitle').AsString; Data^.RType := FormProdCtrl.SQLQProds.FieldByName('PNType').AsString; end;// VSTPL.Expanded[VSTPL.FocusedNode] := True; RxMPLNK.first; while(not RxMPLNK.EOF) do begin if(RxMPLNK.FieldByName('RxChild').AsBoolean = true) then begin XNode := VSTPL.TopNode;// XNode := VSTPL.AddChild(VSTPL.TopNode.Index); VSTPL.InsertNode(VSTPL.FocusedNode,amInsertBefore); end else begin XNode:= VSTPL.TopNode; XNode := VSTPL.AddChild(VSTPL.TopNode); end; Data := VSTPL.GetNodeData(Xnode); Data^.RItem := InttoStr(RxMPLNK.FieldByName('RxPlItem').AsInteger); Data^.RQty := RxMPLNK.FieldByName('RxPlQty').AsInteger; Data^.RPart := RxMPLNK.FieldByName('RxPnpartnumber').AsString; Data^.RCost := RxMPLNK.FieldByName('RxCurrentCost').AsFloat; Data^.RDetail := RxMPLNK.FieldByName('RxDetail').AsString; Data^.RTitle := RxMPLNK.FieldByName('RxTitle').AsString; Data^.RType := RxMPLNK.FieldByName('RxPlType').AsString; RxMPLNK.Next; end; You can see root node not has value but childs has it...
eldonfsr:
All exmples show to addchild node is that is selected but not programatically llike array how we can the node
to insert a node using thsi procedure
VSTPL.InsertNode(VSTPL.FocusedNode,amInsertBefore);
but you see if is focused or selected but not VSTPL.Node[2]
we can get absolutepostiosn but not see some to access lika that ...
Has two option go TopNode or BottomNode first and last one but another address....
Navigation
[0] Message Index