HeidiR Posted August 1, 2008 Share Posted August 1, 2008 Is there a way to hide a control with GUICtrlCreateButton()? Example: GUICtrlCreateButton("", 10, 10, 60, 25, $GUI_HIDE) I have tried the example code above but it doesn't work. However, I can use GUICtrlSetState ($button4, $GUI_HIDE) after creation successfully. HeidiRFind free applications, code examples and more on my site at:http://heidisdownloads.com/ Link to comment Share on other sites More sharing options...
youknowwho4eva Posted August 1, 2008 Share Posted August 1, 2008 you trying to make like an invisible button? that only you know where it is to click it? Giggity Link to comment Share on other sites More sharing options...
HeidiR Posted August 1, 2008 Author Share Posted August 1, 2008 you trying to make like an invisible button? that only you know where it is to click it?Actually, I'm trying to create two buttons on top of each other on the GUI (same x and y). A Process button and an Abort button. Initially, I want the process button shown and enabled and the abort button hidden and disabled. When the process button is clicked, I want the abort button shown and enabled and the process button hidden and disabled. HeidiRFind free applications, code examples and more on my site at:http://heidisdownloads.com/ Link to comment Share on other sites More sharing options...
youknowwho4eva Posted August 1, 2008 Share Posted August 1, 2008 What about deleting the process button after it is pressed, then adding the abort button in its place? Giggity Link to comment Share on other sites More sharing options...
Achilles Posted August 1, 2008 Share Posted August 1, 2008 Actually, I'm trying to create two buttons on top of each other on the GUI (same x and y). A Process button and an Abort button. Initially, I want the process button shown and enabled and the abort button hidden and disabled. When the process button is clicked, I want the abort button shown and enabled and the process button hidden and disabled.If that's the case I would just use the same button and change the text. And then wherever your register that the button has been pressed you could do something like this: If GUICtrlRead($yourBtnCtrl) = 'Process' then ;do whatever Else;that means the button says abort ;do whatever EndIf Set the text of the button using this: GUICtrlSetData($yourBtnCtrl, 'Abort') My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
youknowwho4eva Posted August 1, 2008 Share Posted August 1, 2008 There ya go, I like that idea much better. Giggity Link to comment Share on other sites More sharing options...
HeidiR Posted August 1, 2008 Author Share Posted August 1, 2008 If that's the case I would just use the same button and change the text. And then wherever your register that the button has been pressed you could do something like this: If GUICtrlRead($yourBtnCtrl) = 'Process' then ;do whatever Else;that means the button says abort ;do whatever EndIf Set the text of the button using this: GUICtrlSetData($yourBtnCtrl, 'Abort') Achilles, Thanks for the information! That solution worked fine. For future reference, I'm guessing that it's NOT possible to create a control with a state of disabled or hidden with GUICtrlCreate... Is this accurate? HeidiRFind free applications, code examples and more on my site at:http://heidisdownloads.com/ Link to comment Share on other sites More sharing options...
youknowwho4eva Posted August 1, 2008 Share Posted August 1, 2008 _GUICtrlButton_Show just found that in the help, and I've see the disable before, didn't see it this look through though Giggity Link to comment Share on other sites More sharing options...
Achilles Posted August 2, 2008 Share Posted August 2, 2008 Achilles, Thanks for the information! That solution worked fine. For future reference, I'm guessing that it's NOT possible to create a control with a state of disabled or hidden with GUICtrlCreate... Is this accurate?I don't think so.. but in reality I don't think it would be very useful. I have thought of this before but then just wrote the script with creating the buttons and immediately after disabling them (with the GUI showing) and it worked fine. I couldn't even notice that the buttons were being created enabled. Haven't tried it with hiding and showing though. My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now