Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
3
Erster Beitrag:
vor 2 Jahren, 12 Monaten
Letzter Beitrag:
vor 2 Jahren, 12 Monaten
Beteiligte Autoren:
David Egan, Markus K.

[WD20] Dynamic Tab

Startbeitrag von David Egan am 24.07.2015 05:05

Hi
Has anyone had any luck with undockable dynamic tabs, in particular with storing the positions of the tabs ?

I tried first of all with an internal window with my tab control in there. First time through it worked like a charm, with my tab moving as it should. Different users may organise their screens differently so I have it set to store the position of the tab. Went back in again, the system displayed the tab in the right place but then crashed when it was trying to put the controls there (in my case just a simple table with no data or code attached as I'm just testing it). Just in case it was something in WDTest I compiled it & ran it with exactly the same result.

I then tried running it in a separate non-internal window. This at least doesn't crash but I get the moved tab displayed correctly plus another copy of it still pinned to the tab control. The more times I run it the more pinned copies I get! And this happens if I totally exit the program & restart it; it is obviously storing the detail in the registry & just keeps adding to it.

To be fair, if I don't have it set to store the configuration of the tabs it seems to work pretty well; I may have to see if I can manually program the positioning.

David

Antworten:

Partially solved!

My window init code is set as follows:

newpane is control
newpane


von David Egan - am 24.07.2015 07:29
Hi,
i use a stucture and an array to store all opened tabs. Before creating a new tab i check the array if it is already existing. If not then create it otherwise activate it.


ST_Dyntabs is structure
nID is int
sAlias is string
end
arrDyntas is array of ST_Dyntabs

von Markus K. - am 24.07.2015 08:04
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.