PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Dynamic tab, how to access controls on each pane.
Dynamic tab, how to access controls on each pane.
Débuté par PETR_K, 05 jan. 2016 14:10 - 4 réponses
Membre enregistré
68 messages
Posté le 05 janvier 2016 - 14:10
Hello,

I try to use dynamic tabs. As far as I work on my project everything was ok, untill now.

I would like to acess individual controls on panes (like edit boxes eet, just standard controls) and I do not know how...

This code
TAB_Verze["ALIAS_2"].EDT_Zadani

in debugger shows content of "EDT_Zadani" but the same code in application, in TRACE, or when I try to assign some value to EDT_Zadani, says that 'EDT_Zadani' element not found in 'TAB_Verze' element.

In code editor is ".EDT_Zadani" in red color because compiler knows that only during runtime.

I also tried indirection like this Trace({TAB_Verze[TAB_Verze]+".EDT_Zadani",indWindow}) but it says "'.EDT_Zadani' element unknown."

Any ideas please? Is it some general problem or just something specific to dynamic tabs?


Thank you in advance


Petr
Membre enregistré
7 messages
Posté le 04 mars 2024 - 11:58
Bump up, anyone? i have the same problem
Membre enregistré
7 messages
Posté le 04 mars 2024 - 13:56
i've made some progress.

I wanted to add lines to a table in an open dynamic tab.

Here is how i've done it:
PaneAlias1 is string = "ALIAS_1"
Trace(WIN_MDI_Tab.TAB_Customers_table[PaneAlias1]..Caption)

x is Control <- {PaneAlias1 + ".TABLE_NoName1",indControl}
Trace(x..Caption)
x.AddLine("X","Y")
Message modifié, 04 mars 2024 - 13:56
Membre enregistré
55 messages
Popularité : +2 (2 votes)
Posté le 05 mars 2024 - 10:26
Hi Petr,
It's explained quite well on the help page for the TabOpen() function
https://help.windev.com/…

// Handle a control found in an internal window of a pane
gsAlias is string = TabOpen(TAB_NoName1, "Initial caption", IW_Internal)
x is Control <- TAB_NoName1[gsAlias]
x.IW_Internal.EDT_NoName1.Width = 500


Hope this helps
Andrea
Posté le 25 avril 2024 - 12:26
Why is the control "EDT_Zadani" showing in the debugger but not accessible in the application runtime, and what steps have you taken to ensure proper instantiation and accessibility within the scope of the dynamic tabs implementation?