Customize selected tab when Axis launches?

More
31 Jan 2023 04:20 #263297 by JetForMe
Since I'm working on a VCP, I'm wondering if there's a way to have Axis come up with my tab selected, and also to have the window be a particular size (or remember its last size). I figure there's something to put in .axisrc, but I'm not sure what it should be. TIA!

Please Log in or Create an account to join the conversation.

More
31 Jan 2023 11:31 #263337 by tommylight
Pretty sure PncConf has an option to choose if Axis should open maximised or at a certain size that can be entered there.
Make a new config, set the size, save, then check .axisrc and copy the info to your config.
This last step might not be needed, though, as Axis uses .axisrc at startup no matter what config is uses.

Please Log in or Create an account to join the conversation.

More
01 Feb 2023 00:12 #263409 by cakeslob
did someone say axisrc?

size window stuff(or remember its last size)

window size shouldnt be too hard to do, I dont remember the exact thing, but its something like this
root_window.geometry(f'{width}x{height}+{xPos}+{yPos}')
# or this for fullscreen
root_window.attributes('-fullscreen', True, '-zoomed', False)
# or this for maximized
 root_window.attributes('-fullscreen', False, '-zoomed', True)

funny you should mention remember its last size, thats a thing in plasmac2, and you can do it but you will have to merge it into your thing, it is a little more involved and works by saving a variable of screen size, then loading that at startup


Having axis raise a tab on startup is no big deal,
rC = root_window.tk.call
# pane.top.tabs is the left side tabs, pane.top.right is the other
# raise is to raise on startup
# "preview" is the notebook widget name for the preview tab
rC('.pane.top.tabs','raise','preview')

This issue may be that its a vcp and not an axis tab, Ive never tried with a VCP, so I dont know what you would put for the name, and since its a VCP idk how its created if its before axisrc or after axisrc. I dont know if there is a known way to raise a VCP

Please Log in or Create an account to join the conversation.

More
01 Feb 2023 00:21 #263410 by cakeslob
jet, youve been a busy guy lately. since you might be interested, check out my axis thing that is mostly plasmac2 but without the plasma. still a work in progress though

load this as your usercommand file

 

File Attachment:

File Name: usercomman...c_800.py
File Size:126 KB
Attachments:
The following user(s) said Thank You: tommylight, verser

Please Log in or Create an account to join the conversation.

Time to create page: 0.215 seconds
Powered by Kunena Forum