|
FOROS PROFESIONALES WINDEV, WEBDEV y WINDEV Mobile |
| | | | | |
| Iniciado por guest, 24,jul. 2015 07:05 - 2 respuestas |
| |
| | | |
|
| |
| Publicado el 24,julio 2015 - 07: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 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,julio 2015 - 09:29 |
Partially solved!
My window init code is set as follows: newpane is control newpane <- TabOpen(Tab_Dispatch","Vehicles/Drivers",IW_DispatchVehicles) By changing this to only occur if Tab_Dispatch..occurrence=1 (ie. my base tab pane is the only one there) it does what I need.
Now that is fine for one dynamic tab but what I really need to be able to do is to enumerate all the tabs so that I can identify which ones may need creating. Using EnumSubElement returns 1,2 etc but dynamic tabs require the alias & I require the caption.
Doing some further digging around I can see that it is indeed adding to the registry key. What I can do is check that for each caption & if I find it in the key can ignore it (it only writes if you close the window with the tab undocked).
What fun & games!! It's obviously a bug so I'll forward it to the black hole at PCS
David |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,julio 2015 - 10:04 |
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 |
| |
| |
| | | |
|
| | | | |
| | |
| | |
| |
|
|
|