<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
Hi,
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
<br>
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
I'm porting an application I started (but never finished) in Pyside to Lazarus. This question is only about cosmetics as Treeview works as I want it to.
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
<br>
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
In Pyside I could set a space between nodes by setting the node text as "" and disabling that node so it never gets selection, e.g.
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
<br>
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
self.tvSpace001 = QTreeWidgetItem(self.leftTreeWidget)
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
self.tvSpace001.setText(0, "")
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
self.tvSpace001.setDisabled(True)
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
<br>
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
In Lazarus there seems to be no disabled property for nodes, so when transversing a node with text "" with the keyboard, it will move onto that empty node but not highlight it, when I would prefer it instead moved onto the next or previous node and highlight it.
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
<br>
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
I could write a workaround, storing the last node index, working out if the user has moved up or down, checking if the text is "" and highlighting the previous or next node as required, BUT I just wondered if anyone has a more simple, more elegant solution please?
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
<br>
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
It's only to show visual definition between groups of parents and childs and doesn't actually affect how the application works.
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
<br>
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
Thanks for your help.
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
<br>
</div>
<div class="" style="caret-color: #212121; color: #212121; font-family: monospace; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; background-color: #f7f7f7; text-decoration: none; width: 71ch;" data-evo-paragraph="">
Martin
</div>
</div>
</body>
</html>