PxPlus User Forum
Main Board => Discussions => Programming => Topic started by: steezware 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!
-
Are you doing a 'goto'(the_window_with_the_control), before trying to access the control?
-
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.
-
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
-
(https://media1.giphy.com/media/OK27wINdQS5YQ/200w.gif?cid=790b7611szc9bnghu4s8z1ymblw9keftd2jmmozjv589k7uw&ep=v1_gifs_search&rid=200w.gif&ct=g)