Move pyvcp location to bottom for portrait display
23 Feb 2020 07:32 #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 or Create an account to join the conversation.
23 Feb 2020 15:08 #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 or Create an account to join the conversation.
24 Feb 2020 04:24 #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:
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
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:
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 or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19198
- Thank you received: 6436
24 Feb 2020 08:59 #158360
by tommylight
Replied by tommylight on topic Move pyvcp location to bottom for portrait display
Neat !
Thank you.
Thank you.
Please Log in or Create an account to join the conversation.
24 Feb 2020 09:31 #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 or Create an account to join the conversation.
24 Feb 2020 09:41 - 25 Feb 2020 02:14 #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
Last edit: 25 Feb 2020 02:14 by phillc54.
The following user(s) said Thank You: sdwyer
Please Log in or Create an account to join the conversation.
03 Mar 2020 21:55 - 03 Mar 2020 23:59 #159118
by phillc54
Replied by phillc54 on topic Move pyvcp location to bottom for portrait display
Chris has merged this into master and will put it in 2.8 later. 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.
Last edit: 03 Mar 2020 23:59 by phillc54. Reason: update
The following user(s) said Thank You: tommylight, roland
Please Log in or Create an account to join the conversation.
Time to create page: 0.070 seconds