<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<div dir="auto">
<div dir="auto">Thank you. I didn't particularly want to use QT in Lazarus but Pyside is QT only. </div><div dir="auto"><br></div><div dir="auto">I'll get my application up and working first I think and then maybe have a look at the treeview source for cosmetic tweaks. Writing my own wrapper for a QT widget set is beyond my capabilities but thank you anyway.</div><div dir="auto"><br></div><div dir="auto">Best regards,</div><div dir="auto"><br></div><div dir="auto">Martin</div><div dir="auto"><br></div>
<div id="aqm-original" style="color: black;">
<div dir="auto">On 30 June 2020 08:09:39 zeljko <zeljko@holobit.net> wrote:</div>
<div><br></div>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #808080; padding-left: 0.75ex;">
<div dir="auto">On 6/30/20 1:10 AM, Martin via lazarus wrote:</div>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #0099CC; padding-left: 0.75ex;">
<div dir="auto">Hi,</div>
<div dir="auto"><br></div>
<div dir="auto">I'm porting an application I started (but never finished) in Pyside to </div>
<div dir="auto">Lazarus. This question is only about cosmetics as Treeview works as I </div>
<div dir="auto">want it to.</div>
<div dir="auto"><br></div>
<div dir="auto">In Pyside I could set a space between nodes by setting the node text as </div>
<div dir="auto">"" and disabling that node so it never gets selection, e.g.</div>
<div dir="auto"><br></div>
<div dir="auto"> self.tvSpace001 = QTreeWidgetItem(self.leftTreeWidget)</div>
<div dir="auto"> self.tvSpace001.setText(0, "")</div>
<div dir="auto"> self.tvSpace001.setDisabled(True)</div>
<div dir="auto"><br></div>
<div dir="auto">In Lazarus there seems to be no disabled property for nodes, so when </div>
<div dir="auto">transversing a node with text "" with the keyboard, it will move onto </div>
<div dir="auto">that empty node but not highlight it, when I would prefer it instead </div>
<div dir="auto">moved onto the next or previous node and highlight it.</div>
<div dir="auto"><br></div>
<div dir="auto">I could write a workaround, storing the last node index, working out if </div>
<div dir="auto">the user has moved up or down, checking if the text is "" and </div>
<div dir="auto">highlighting the previous or next node as required, BUT I just wondered </div>
<div dir="auto">if anyone has a more simple, more elegant solution please?</div>
<div dir="auto"><br></div>
<div dir="auto">It's only to show visual definition between groups of parents and childs </div>
<div dir="auto">and doesn't actually affect how the application works.</div>
</blockquote>
<div dir="auto"><br></div>
<div dir="auto">Lazarus uses it's own implementation of TTreeView, so you have to create </div>
<div dir="auto">your own LCL wrapper for QTreeWidget.</div>
<div dir="auto"><br></div>
<div dir="auto">zeljko</div>
</blockquote>
</div><div dir="auto"><br></div>
</div></body>
</html>