 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
beardboy
Joined: 02 Mar 2004 Posts: 444 Location: SLC, Utah
|
Posted: Wed Feb 09, 2005 10:02 pm Post subject: +AlwaysOnTop +Disabled |
|
|
I might have found a bug this time.
There seems to be a problem with the +AlwaysOnTop and +Disabled when using a popup 2nd gui on top. I have commented out a couple of the lines, but if you use either of those options it kills the main gui after the Gui, 2:Hide. I used to use WinSet and that appears to be still working, but the +0x8000000 also used to work, but now doesn't.
| Code: | Gui, Add, Radio, vNow, Radio 1
Gui, Add, Radio,, Radio 2
Gui, Add, Radio,, Radio 3
Gui, Add, Button, w60, Run
Gui, Show, w200, TestGUI
Gui, 2:+owner1 -caption +border ; Make #2 window owned by #1 window
Gui, 2:color, Yellow
Gui, 2:font, bold
Gui, 2:Add, Text, w120 cBlue center, Creating File(s)...
return
GUIClose:
ExitApp
ButtonRun:
Gui, 1:+disabled ; Disable Gui
;Gui, 1:+0x8000000 ; Disable Gui
;Gui, 1:+alwaysontop ; Turn on Always On Top
WinSet, AlwaysOnTop, On, TestGUI
Gui, 2:Show
Loop, 5
{
GuiControl, 2:, Static1, Creating File %a_index%...
Sleep, 1000
}
Gui, 2:Hide
Gui, 1:-disabled ; Enable Gui
;Gui, 1:-0x8000000 ; Enable Gui
;Gui, 1:-alwaysontop ; Turn off Always on top
WinSet, AlwaysOnTop, Off, TestGUI
Return |
Let me know if I am missing something again.
thanks,
beardboy |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Thu Feb 10, 2005 2:51 am Post subject: |
|
|
I think this can be fixed by doing a "Gui Show" after any re-enabling of a window. Although this is in the help file, it is buried in a comment somewhere. Therefore, I will add the following to the paragraph that describes "Disabled": | Quote: | | When later re-enabling the window via -Disabled (minus Disabled), it is probably necessary to use Gui Show afterward to get the window to update properly. | Upon reflections, I'm glad you mentioned this because doing "Gui Show" afterward is not good because:
1) It's an extra step.
2) It activates the window as a side-effect, which might be undesirable if the user has switched away from the whole thing.
I'll try to fix this. |
|
| Back to top |
|
 |
beardboy
Joined: 02 Mar 2004 Posts: 444 Location: SLC, Utah
|
Posted: Thu Feb 10, 2005 3:15 am Post subject: |
|
|
Even adding a Gui Show doesn't resolve the problem. It's like the 1st Gui takes on the attributes of the 2nd Gui. With no caption but also acts like it has no border.
Run this and see what happens:
| Code: | Gui, Add, Radio, vNow, Radio 1
Gui, Add, Radio,, Radio 2
Gui, Add, Radio,, Radio 3
Gui, Add, Button, w60, Run
Gui, Show, w200, TestGUI
Gui, 2:+owner1 -caption +border ; Make #2 window owned by #1 window
Gui, 2:color, Yellow
Gui, 2:font, bold
Gui, 2:Add, Text, w120 cBlue center, Creating File(s)...
return
GUIClose:
ExitApp
ButtonRun:
Gui, 1:+disabled ; Disable Gui
Gui, 1:+alwaysontop ; Turn on Always On Top
Gui, 2:Show
Loop, 5
{
GuiControl, 2:, Static1, Creating File %a_index%...
Sleep, 1000
}
Gui, 2:Hide
Gui, 1:-disabled ; Enable Gui
Gui, 1:-alwaysontop ; Turn off Always on top
Gui, Show
Return |
Before Clicking on Run:
After:
Edit: Added Pictures
thanks,
beardboy |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Thu Feb 10, 2005 10:30 pm Post subject: |
|
|
Thanks for such wonderful examples. It makes bug-fixing so much easier because the test scripts are pre-packaged and ready to go. Not to mention illustrated!
I believe these issues have all been fixed in today's release. Thanks again. |
|
| Back to top |
|
 |
beardboy
Joined: 02 Mar 2004 Posts: 444 Location: SLC, Utah
|
Posted: Thu Feb 10, 2005 11:52 pm Post subject: |
|
|
| Quote: | | I believe these issues have all been fixed in today's release. | Works perfect now. Thanks for the quick fix.
thanks,
beardboy |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|