Nested Tabs Imposable?
17 Oct 2013 08:40 #39989
by DaOne
Nested Tabs Imposable? was created by DaOne
Here is my code...
This is what I get...
What am I doing wrong as to why the contents of the nested tab is not showing?
<tabs>
<names> ["Diagnostics","tab 2"]</names>
<vbox>
<tabs>
<names> ["Inputs","Outputs"]</names>
<vbox>
<label>
<text>"(this is the inputs tab)"</text>
</label>
</vbox>
<vbox>
<label>
<text>"(this is the outputs tab)"</text>
</label>
</vbox>
</tabs>
</vbox>
<vbox>
<label>
<text>"(this tab has nothing on it yet)"</text>
</label>
</vbox>
</tabs>
What am I doing wrong as to why the contents of the nested tab is not showing?
Please Log in or Create an account to join the conversation.
17 Oct 2013 14:50 #39995
by ArcEye
Replied by ArcEye on topic Nested Tabs Imposable?
HI
I don't have time to test it now, but looking at what little documentation there is that covers tabs
www.linuxcnc.org/docs/2.4/html/hal_pyvcp.html
I think you need to close the xml block after the initial declaration of names with </tab> and then open another block
regards
I don't have time to test it now, but looking at what little documentation there is that covers tabs
www.linuxcnc.org/docs/2.4/html/hal_pyvcp.html
I think you need to close the xml block after the initial declaration of names with </tab> and then open another block
regards
Please Log in or Create an account to join the conversation.
17 Oct 2013 17:44 #39999
by andypugh
Using PyVCP rather than GladeVCP?
GladeVCP is a little more trouble for simple things, but it doesn't look like you are doing a simple thing.
I wanted a big display that I could see across the room last night, so I used PyVCP.
I was working on a tool-data interface tab for my Touchy installatoon too, I used GladeVCP.
At the basic level you can use GladeVCP just like PyVCP, except you can design it with a graphical editor. But you also have the option of embedding code to perform actions (and as the code can see "inside" linuxcnc with the linuxcnc.stat structure, this allows all sorts of fun things.). There are some rather more interesting widgets in GladeVCP.
The trick is to only use the items at the bottom of the widget list, as they are the ones that have HAL pins. Also the editor is rather strange.
It does actually create XML, so there is the option of hand-editing too.
Replied by andypugh on topic Nested Tabs Imposable?
What am I doing wrong?
Using PyVCP rather than GladeVCP?
GladeVCP is a little more trouble for simple things, but it doesn't look like you are doing a simple thing.
I wanted a big display that I could see across the room last night, so I used PyVCP.
I was working on a tool-data interface tab for my Touchy installatoon too, I used GladeVCP.
At the basic level you can use GladeVCP just like PyVCP, except you can design it with a graphical editor. But you also have the option of embedding code to perform actions (and as the code can see "inside" linuxcnc with the linuxcnc.stat structure, this allows all sorts of fun things.). There are some rather more interesting widgets in GladeVCP.
The trick is to only use the items at the bottom of the widget list, as they are the ones that have HAL pins. Also the editor is rather strange.
It does actually create XML, so there is the option of hand-editing too.
Please Log in or Create an account to join the conversation.
17 Oct 2013 18:59 #40002
by BigJohnT
The example code seems to be incorrect, you can only have one tabs block it seems.
JT
Replied by BigJohnT on topic Nested Tabs Imposable?
HI
I don't have time to test it now, but looking at what little documentation there is that covers tabs
www.linuxcnc.org/docs/2.4/html/hal_pyvcp.html
I think you need to close the xml block after the initial declaration of names with </tab> and then open another block
regards
The example code seems to be incorrect, you can only have one tabs block it seems.
JT
Please Log in or Create an account to join the conversation.
17 Oct 2013 20:28 - 17 Oct 2013 20:31 #40005
by ArcEye
Replied by ArcEye on topic Nested Tabs Imposable?
OK just done some tests
Your code is fine, but because you did not specify sizes or expand the widgets with the mouse, the contents of the nested tabs are hidden
I used this called tab.xml
and called it with
halcmd: loadusr -Wn tab pyvcp -c tab tab.xml
having stretched the widget a bit with the mouse to reveal the nestings, the results are
Using the pyvcp -g switch would have displayed the widgets at preset sizes and hopefully ensured the nestings were visible
"-g <WxH><+X+Y> specifies the geometry to be used when constructing the panel. The syntax is "Width"x"Height"+"X Anchor"+"Y Anchor". You can set the size or position or both. The anchor point is the upper left corner of the panel. An example is -g 250x500+800+0 This sets the panel at 250 pixels wide, 500 pixels tall, and anchors it at X800 Y0".
regards
Your code is fine, but because you did not specify sizes or expand the widgets with the mouse, the contents of the nested tabs are hidden
I used this called tab.xml
<pyvcp>
<tabs>
<names> ["Tab1","Tab2"]</names>
<vbox>
<tabs>
<names> ["Nested1A","Nested1B"]</names>
<vbox>
<label>
<text>"(Nested 1A)"</text>
</label>
</vbox>
<vbox>
<label>
<text>"(Nested 1B)"</text>
</label>
</vbox>
</tabs>
</vbox>
<vbox>
<tabs>
<names> ["Nested2A","Nested2B"]</names>
<vbox>
<label>
<text>"(Nested 2A)"</text>
</label>
</vbox>
<vbox>
<label>
<text>"(Nested 2B)"</text>
</label>
</vbox>
</tabs>
</vbox>
</tabs>
</pyvcp>
and called it with
halcmd: loadusr -Wn tab pyvcp -c tab tab.xml
having stretched the widget a bit with the mouse to reveal the nestings, the results are
Using the pyvcp -g switch would have displayed the widgets at preset sizes and hopefully ensured the nestings were visible
"-g <WxH><+X+Y> specifies the geometry to be used when constructing the panel. The syntax is "Width"x"Height"+"X Anchor"+"Y Anchor". You can set the size or position or both. The anchor point is the upper left corner of the panel. An example is -g 250x500+800+0 This sets the panel at 250 pixels wide, 500 pixels tall, and anchors it at X800 Y0".
regards
Last edit: 17 Oct 2013 20:31 by ArcEye.
Please Log in or Create an account to join the conversation.
17 Oct 2013 21:29 #40011
by DaOne
Replied by DaOne on topic Nested Tabs Imposable?
ArcEye,
Would you mind showing me where in the xml code I would be defining its size?
Would you mind showing me where in the xml code I would be defining its size?
Please Log in or Create an account to join the conversation.
17 Oct 2013 22:00 #40012
by DaOne
Replied by DaOne on topic Nested Tabs Imposable?
Also I am not using this as a stand alone widget but as a axis sidebar.
Please Log in or Create an account to join the conversation.
17 Oct 2013 22:13 #40013
by BigJohnT
Replied by BigJohnT on topic Nested Tabs Imposable?
Please Log in or Create an account to join the conversation.
17 Oct 2013 22:18 #40014
by BigJohnT
Replied by BigJohnT on topic Nested Tabs Imposable?
Please Log in or Create an account to join the conversation.
17 Oct 2013 22:21 #40015
by DaOne
Replied by DaOne on topic Nested Tabs Imposable?
JT,
Thats exactly what I get. I see nothing in the nested tabs.
Thats exactly what I get. I see nothing in the nested tabs.
Please Log in or Create an account to join the conversation.
Time to create page: 0.194 seconds