| |
| Publicado el 23,noviembre 2017 - 16:40 |
Hi, I'd like to have the name of a window before open it.
I tried with WIN_MyWindow..Name but it gives error.
Thanks, Dann |
| |
| |
| | | |
|
| | |
| |
| Publicado el 23,noviembre 2017 - 16:52 |
Hello Dan,
If you use it in the initialization code of the opening window you use
MySelf..Name or MySelf..Alias
DW |
| |
| |
| | | |
|
| | |
| |
| Publicado el 23,noviembre 2017 - 18:07 |
| You cant get the windows alias before it exists. Maybe WinStatus() helps you to check if the window is open or not. If opened then you can get the alias otherwise not. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 23,noviembre 2017 - 18:59 |
Hi Marcus,
not as far as I know... you need to use "Win_MyWindow" when it's not open yet.
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 23,noviembre 2017 - 19:14 |
Hello Dann
Can you explain the circumstances as to why you need to know the name of the unopened window as that may help with a solution.
Regards Al |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,noviembre 2017 - 01:40 |
@ Fabrice, afaik the alias can only be allocated when you open the window. How else should the runtime "knows" how many windows are opened? Have a look at the mdi tab: Open a tab and the internal window/the tab "gets" his alias. If you dont open the window the window doesnt get a place in the memory and so also no alias.
Greetings Markus |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,noviembre 2017 - 09:06 |
My intention is to manage a big menu with differents categories of windows, every category is included in a component. Everytime you choose a category a Looper control of buttons is erased and filled by the buttons that will open the windows. I manage all this stuff with a associative array of strings including the name of the windows.
My problem is that when i change the name of a window in one of my components, the menu doesn't give me a warning, because the name of that window is in a string ("WIN_MyWindow") and not retrieved by a property of the window (WIN_MyWindow..Name).
I'd like not to change the structure of the menu with associative array, I just want to know if it's possible to have the name of a window before that is opened.
Thanks, Dann |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,noviembre 2017 - 10:18 |
| When i understand you correctly, you have hardcoded the names of your windows into an array. Then you could use the directory in which the windows are located. At the start of your program check the validity of the window names in the array so you get informed when you forgot to rename a windows name. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,noviembre 2017 - 10:44 |
Dann,
it is possible to get the name even if the window is not open. But only the name as it has in the project, which is your name and may not be a user friendly name. Indeed while a window is not open you you cannot access it to get the Caption or Width or whatever property.
// Enumerate the windows of a project WindowName is string = EnumElement(enumWindow) // Browse all the windows WHILE WindowName <> "" // Go to the next window WindowName = EnumElement() END
When I think about this you could Open() all windows with the code above and when you "detect" in the opening-section of the window that it is opened in this special mode (i.e. setting a global boolean), you can Close() it right away. At that point there is no visible action to the end-user, but you have the ability to get some extra window-info before closing it! |
| |
| |
| | | |
|
| | |