Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
6
Erster Beitrag:
vor 9 Jahren
Letzter Beitrag:
vor 3 Jahren, 8 Monaten
Beteiligte Autoren:
Hugo Tessaro, Alexander Predl, Fabrice Harari.pcs.crosspost, David Egan

[WD11] Assign Control to Tab

Startbeitrag von David Egan am 02.02.2009 07:33

Hi
Is there any way to programmatically assign a control to a Tab? I am using ControlClone to create controls, which I only want to appear on Tab[7] of my tab control. Windev does the cloning perfectly but doesn't associate it with the specific tab, so as soon as you change Tab you've got this control mucking up the display. I've tried having the base control set to Tab[7] but that didn't solve it. Is this possible or do I need to manually hide/unhide the controls.

Thanks

David

Antworten:

Hi David...

You'll have to play with the invisible property in the code of the tab
control, that's the only way

best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

More information on http://www.fabriceharari.com


David Egan wrote:
> Hi
> Is there any way to programmatically assign a control to a Tab? I am using ControlClone to create controls, which I only want to appear on Tab[7] of my tab control. Windev does the cloning perfectly but doesn't associate it with the specific tab, so as soon as you change Tab you've got this control mucking up the display. I've tried having the base control set to Tab[7] but that didn't solve it. Is this possible or do I need to manually hide/unhide the controls.
> Thanks
> David
>
Message forwarded from pcsoft.us.windev

von Fabrice Harari.pcs.crosspost - am 02.02.2009 12:02
up.

This functionally was implemented in WD17?

von Hugo Tessaro - am 29.05.2014 20:51
Hi,David & Hugo,

in Wd19 this is possible:

TAB_MAIN is the tab control


ControlClone(EDT_Name,"TAB_MAIN[1].EDT_New",8,200)


works!

von Alexander Predl - am 30.05.2014 20:44
Hi Alexander,

Thanks for reply, but has a way to know if EDT_Name is in TAB[1] or TAB[2] ... ?
To get the name of tab control has ControlTab(), but what index is assigned I dont found...

von Hugo Tessaro - am 02.06.2014 11:25
Well, for now I will use a function that I created:


PROCEDURE getTabIndex(control)

fullName is string = control..FullName
cTab is string = ControlTab(fullName)

IF cTab "" THEN
w is string = ExtractString(fullName,1,".")
n is string = ExtractString(fullName,2,".")

IF w EOT _AND_ n EOT THEN
FOR i = 1 TO 33
WHEN EXCEPTION IN
s is string = StringBuild("%1.%2[%3].%4", w, cTab, i, n)
s = {s}
RESULT i
DO
END
END
END
END

RESULT 0


von Hugo Tessaro - am 02.06.2014 13:28
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.