Using Offsetpage Widget?
- Todd Zuercher
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 4733
- Thank you received: 1449
18 Apr 2026 05:40 #345676
by Todd Zuercher
Replied by Todd Zuercher on topic Using Offsetpage Widget?
Attachments:
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7314
- Thank you received: 2144
19 Apr 2026 13:29 #345734
by cmorley
Replied by cmorley on topic Using Offsetpage Widget?
As I expected, it's because offsetpage does not automatically find the var file.
You must make a handler file to set the var file path.
Something like this (it assumes the offset widget is called 'offsetpage' and the var file is called 'sim.var')
You must make a handler file to set the var file path.
Something like this (it assumes the offset widget is called 'offsetpage' and the var file is called 'sim.var')
import os
varpath = os.path.join(os.getcwd(),'sim.var')
def get_handlers(halcomp,builder,useropts):
return [HandlerClass(halcomp,builder,useropts)]
class HandlerClass:
def __init__(self, halcomp,builder,useropts):
obj = builder.get_object('offsetpage')
obj.set_filename(varpath)
obj.set_col_visible("abcuvw", False)
The following user(s) said Thank You: Todd Zuercher, tommylight
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 4733
- Thank you received: 1449
20 Apr 2026 10:21 #345759
by Todd Zuercher
Replied by Todd Zuercher on topic Using Offsetpage Widget?
Attachments:
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 4733
- Thank you received: 1449
20 Apr 2026 10:41 - 21 Apr 2026 18:39 #345762
by Todd Zuercher
Replied by Todd Zuercher on topic Using Offsetpage Widget?
Never mind, I had the name of my handler file wrong in the ini file.
It works!
Thank you
And the INI lines to add it to a tab in Axis.
It works!
Thank you
And the INI lines to add it to a tab in Axis.
EMBED_TAB_NAME=Work Offsets
EMBED_TAB_COMMAND=gladevcp -u ./offsets.py -x {XID} ./offsets.uiAttachments:
Last edit: 21 Apr 2026 18:39 by Todd Zuercher. Reason: added ini lines.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7314
- Thank you received: 2144
20 Apr 2026 13:24 #345771
by cmorley
Replied by cmorley on topic Using Offsetpage Widget?
excellent.
Please Log in or Create an account to join the conversation.
Moderators: HansU
Time to create page: 0.157 seconds