- Posts: 12
- Thank you received: 0
Move pyvcp location to bottom for portrait display
6 years 8 months ago #158279
by sdwyer
Move pyvcp location to bottom for portrait display was created by sdwyer
Hi,
I'm looking to change my monitor orientation from Landscape to portrait so I can mount it on the side of my enclosure.
I'm using the Axis UI and have developed a ppvcp panel that sits in the default right side of the Axis display.
Is it possible to move the pyvcp location to the bottom either below or above the gcode window?
This would make a vertical display a more feasible option for me.
Cheers!
-Shaun
I'm looking to change my monitor orientation from Landscape to portrait so I can mount it on the side of my enclosure.
I'm using the Axis UI and have developed a ppvcp panel that sits in the default right side of the Axis display.
Is it possible to move the pyvcp location to the bottom either below or above the gcode window?
This would make a vertical display a more feasible option for me.
Cheers!
-Shaun
Please Log in to join the conversation.
6 years 8 months ago #158300
by cmorley
Replied by cmorley on topic Move pyvcp location to bottom for portrait display
There is not an easy way to do this - it requires code changes - which may be possible using the .axisrc capability.
Just wait and maybe the AXIS guru will help you out...
Chris
Just wait and maybe the AXIS guru will help you out...
Chris
Please Log in to join the conversation.
6 years 8 months ago #158356
by phillc54
Replied by phillc54 on topic Move pyvcp location to bottom for portrait display
Unfortunately because the relevant code is not in a function it cannot be changed from .axisrc
It is a simple code change in axis.py from:
to:
A neater way would be to change it to:
and have an optional PYVCP_POSITION in the [DISPLAY] section of the ini file requiring BOTTOM to effect the change.
Attached image is with the pyvcp-demo sample and would need to be reconfigured to suit the placement
Note that the line numbers above are correct for master branch.
It is a simple code change in axis.py from:
Code:
3797 f = Tkinter.Frame(root_window)
3798 f.grid(row=0, column=4, rowspan=6, sticky="nw", padx=4, pady=4)
3799 vcpparse.filename = vcp
Code:
3797 f = Tkinter.Frame(root_window)
3798 f.grid(row=4, column=0, columnspan=6, sticky="nw", padx=4, pady=4)
3799 vcpparse.filename = vcp
A neater way would be to change it to:
Code:
3797 f = Tkinter.Frame(root_window)
3798 if inifile.find("DISPLAY", "PYVCP_POSITION") == "BOTTOM":
3799 f.grid(row=4, column=0, columnspan=6, sticky="nw", padx=4, pady=4)
3800 else:
3801 f.grid(row=0, column=4, rowspan=6, sticky="nw", padx=4, pady=4)
3802 vcpparse.filename = vcp
Attached image is with the pyvcp-demo sample and would need to be reconfigured to suit the placement
Note that the line numbers above are correct for master branch.
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
Less
More
- Posts: 22010
- Thank you received: 3
6 years 8 months ago #158360
by tommylight
Replied by tommylight on topic Move pyvcp location to bottom for portrait display
Neat ! 
Thank you.
Thank you.
Please Log in to join the conversation.
6 years 8 months ago #158363
by sdwyer
Replied by sdwyer on topic Move pyvcp location to bottom for portrait display
Hi Phill,
Thankyou! This looks really good! Do you think this is something that might be worth committing to the tree? I'm sure I'm not the only one who would benefit from this code.
Cheers!
-Shaun
Thankyou! This looks really good! Do you think this is something that might be worth committing to the tree? I'm sure I'm not the only one who would benefit from this code.
Cheers!
-Shaun
Please Log in to join the conversation.
6 years 8 months ago #158364
by phillc54
Replied by phillc54 on topic Move pyvcp location to bottom for portrait display
It probably is worth committing at least into master, it shouldn't break any existing configs.
Edit: github.com/LinuxCNC/linuxcnc/pull/685
Edit: github.com/LinuxCNC/linuxcnc/pull/685
Please Log in to join the conversation.
6 years 7 months ago #159118
by phillc54
Replied by phillc54 on topic Move pyvcp location to bottom for portrait display
Chris has merged this into master and [strike]will put it in 2.8 later.[/strike] 2.8
linuxcnc.org/docs/devel/html/gui/pyvcp.html#sec:pyvcp-with-axis
There is also an example configuration.
linuxcnc.org/docs/devel/html/gui/pyvcp.html#sec:pyvcp-with-axis
There is also an example configuration.
Please Log in to join the conversation.
Time to create page: 0.115 seconds
