Toggle navigation
PxPlus User Forum
PxPlus User Forum
»
Main Board
»
Discussions
»
Programming
»
Accessing a Control on Another Dialog
Likes
« previous
next »
Print
Pages: [
1
]
Author
Topic: Accessing a Control on Another Dialog (Read 1194 times)
steezware
Member
Posts: 16
Accessing a Control on Another Dialog
«
on:
August 09, 2023, 06:19:35 PM »
So, I'm in a dialog and I want to access/update a control, say a listbox, on the window that spawned the current dialog with focus.
Seems like I used to know how to do this, but maybe it can't even be done?
Thx!
Logged
Ken Sproul
Gold Member
Posts: 61
Re: Accessing a Control on Another Dialog
«
Reply #1 on:
August 09, 2023, 06:36:14 PM »
Are you doing a 'goto'(the_window_with_the_control), before trying to access the control?
Logged
Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC
steezware
Member
Posts: 16
Re: Accessing a Control on Another Dialog
«
Reply #2 on:
August 09, 2023, 07:14:02 PM »
Figured it out:
PRINT 'SWAP'
LB'Visible = 0 (I passed the LB control value into the new 'process)
PRINT 'SWAP'
Thx for the 'goto' idea but tried 'swap' first and it worked.
Logged
Mike King
Diamond Member
Posts: 3824
Mike King
Re: Accessing a Control on Another Dialog
«
Reply #3 on:
August 09, 2023, 09:03:36 PM »
It likely would be easier to just use Pseudo control handles. You can use the *system object to get the handle for any control in the system and then use it anywhere to access the control.
https://manual.pvxplus.com/page/objctl2/overview.htm
->button 10,@(10,10,10,10)="hello
->osys=new("*system")
->%Btn_handle=osys'Control(10)
->?Btn_handle
1000100010
Logged
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com
James Crowther
Member
Posts: 11
Re: Accessing a Control on Another Dialog
«
Reply #4 on:
August 10, 2023, 01:13:49 PM »
Logged
Print
Pages: [
1
]
« previous
next »
PxPlus User Forum
»
Main Board
»
Discussions
»
Programming
»
Accessing a Control on Another Dialog