PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → how to pass parameters to internal window
how to pass parameters to internal window
Débuté par Mick, 08 oct. 2020 06:42 - 3 réponses
Posté le 08 octobre 2020 - 06:42
Hi,i am Mick

i want to pass parameters to internal window.

Although I see the document description(https://doc.windev.com/en-US/…,
there may be some missing information in the document description, so I still don't know how to operate. If someone has already done so, I hope u can give me some help. Thank you so much!
Membre enregistré
54 messages
Popularité : +2 (2 votes)
Posté le 08 octobre 2020 - 11:05
Hi Mick,
if your internal window is in a dynamic tab you can pass parameters directly in tabopen()

TabOpen(TAB_Main, "Test of the new tab", IW_YourInternalWindow,"Param1","Param2","Param3")

If your internal window in opened in a 'internal window control' you have to open your window with ChangeSourceWindow passing your paramaters

or

create a list of variable in your internal window
Param1 is int
Param2 is string

and a procedure to do the init code

Procedure myInitCode
...

and then

IWCTRL_Control.Param1=100
IWCTRL_Control.Param2="test"

IWCTRL_Control.myInitCode

I hope this help
Bye

Andrea
Posté le 08 octobre 2020 - 12:13
Andrea Chiadò Piat wrote:
Hi Mick,
if your internal window is in a dynamic tab you can pass parameters directly in tabopen()

TabOpen(TAB_Main, "Test of the new tab", IW_YourInternalWindow,"Param1","Param2","Param3")

If your internal window in opened in a 'internal window control' you have to open your window with ChangeSourceWindow passing your paramaters

or

create a list of variable in your internal window
Param1 is int
Param2 is string

and a procedure to do the init code

Procedure myInitCode
...

and then

IWCTRL_Control.Param1=100
IWCTRL_Control.Param2="test"

IWCTRL_Control.myInitCode

I hope this help
Bye

Andrea



Thank so much,but i still have some question(i want to try third way)
1)in the internal window,in the event of Global declaration? For example:
>>>Procedure myInitCode(Param1 is string)
2)Call this procedure in the window that contains the "Internal Window" control in the event of "Before uploading the internal window"? For example:
IWCTRL_Control.Param1 = “test”
IWCTRL_Control.myInitCode



i have tried,but i can't work.Wish your deep help!
Thanks so so much
Posté le 08 octobre 2020 - 12:13
Andrea Chiadò Piat wrote:
Hi Mick,
if your internal window is in a dynamic tab you can pass parameters directly in tabopen()

TabOpen(TAB_Main, "Test of the new tab", IW_YourInternalWindow,"Param1","Param2","Param3")

If your internal window in opened in a 'internal window control' you have to open your window with ChangeSourceWindow passing your paramaters

or

create a list of variable in your internal window
Param1 is int
Param2 is string

and a procedure to do the init code

Procedure myInitCode
...

and then

IWCTRL_Control.Param1=100
IWCTRL_Control.Param2="test"

IWCTRL_Control.myInitCode

I hope this help
Bye

Andrea



Thank so much,but i still have some question(i want to try third way)
1)in the internal window,in the event of Global declaration? For example:
>>>Procedure myInitCode(Param1 is string)
2)Call this procedure in the window that contains the "Internal Window" control in the event of "Before uploading the internal window"? For example:
IWCTRL_Control.Param1 = “test”
IWCTRL_Control.myInitCode



i have tried,but i can't work.Wish your deep help!
Thanks so so much