 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
The annoying bug! Guest
|
Posted: Tue Feb 02, 2010 4:04 pm Post subject: edit controls with transparency |
|
|
I have two edit controls over a picture with some transparency
Watch what happens when I disable the edit controls
The background..
all enabled...
Watch what happens when the edit controls are disabled (with f5) !
edit boxes background have became transparent...thats undesirable for me
What to do now?
[Title edited. Please write descriptive titles for your topics. ~jaco0646] |
|
| Back to top |
|
 |
The annoying bug! Guest
|
Posted: Tue Feb 02, 2010 4:07 pm Post subject: |
|
|
| Code: | background:="axpssplogo.png"
Gui, 1: Add, Picture, x0 y0 BackgroundTrans , %background%
Gui, 1: Add, Edit, vName x100 y80 -WantReturn
Gui, 1: Add, Edit, vNumber yp+30 -WantReturn
Gui, 1: Color, blue
Gui, 1: +LastFound
WinSet, TransColor, blue
gui, 1: -Caption -SysMenu +Owner -Resize
gui, 1: Show, Center
RETURN
f5::
GuiControl, 1:Disable, Name
GuiControl, 1:Disable, Number
return
f6::
GuiControl, 1:Enable, Name
GuiControl, 1:Enable, Number
return |
|
|
| Back to top |
|
 |
The annoying bug! Guest
|
Posted: Tue Feb 02, 2010 4:09 pm Post subject: |
|
|
All answers welcomed!
Thank you in advance! |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 3113 Location: MN, USA
|
Posted: Tue Feb 02, 2010 5:42 pm Post subject: |
|
|
| Could you use Hide/Show instead of Disable/Enable? |
|
| Back to top |
|
 |
The annoying bug! Guest
|
Posted: Tue Feb 02, 2010 6:13 pm Post subject: |
|
|
| Unfortunately no. |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 3113 Location: MN, USA
|
Posted: Tue Feb 02, 2010 6:56 pm Post subject: |
|
|
How about this? | Code: | background:="axpssplogo.png"
Gui, 1: Add, Picture, x0 y0 BackgroundTrans , %background%
Gui, 1: Add, Edit, vName x100 y80 -WantReturn
Gui, 1: Add, Text, vTxt1 xp yp wp hp Hidden BackgroundTrans
Gui, 1: Add, Edit, vNumber yp+30 -WantReturn
Gui, 1: Add, Text, vTxt2 xp yp wp hp Hidden BackgroundTrans
Gui, 1: Color, blue
Gui, 1: +LastFound
WinSet, TransColor, blue
gui, 1: -Caption -SysMenu +Owner -Resize
gui, 1: Show, Center
RETURN
f5::
Gui, Submit, NoHide
GuiControl, 1:, Txt1, %Name%
GuiControl, 1:, Txt2, %Number%
GuiControl, 1:Show, Txt1
GuiControl, 1:Show, Txt2
GuiControl, 1:Hide, Name
GuiControl, 1:Hide, Number
return
f6::
GuiControl, 1:Hide, Txt1
GuiControl, 1:Hide, Txt2
GuiControl, 1:Show, Name
GuiControl, 1:Show, Number
return |
|
|
| Back to top |
|
 |
complx
Joined: 22 Jan 2010 Posts: 34 Location: Germany
|
Posted: Tue Feb 02, 2010 7:57 pm Post subject: |
|
|
or this
| Code: |
background:="axpssplogo.png"
Gui, 1: Add, Picture, x0 y0 BackgroundTrans , %background%
Gui, 1: Add, Edit, vName x100 y80 -WantReturn
Gui, 1: Add, Text, vTxt1 xp+3 yp+3 wp-6 hp-6 Hidden -BackgroundTrans
Gui, 1: Add, Edit, vNumber xp-3 yp+27 -WantReturn
Gui, 1: Add, Text, vTxt2 xp+3 yp+3 wp-6 hp-6 Hidden -BackgroundTrans
Gui, 1: Color, blue
Gui, 1: +LastFound
Gui, Color,, F0F0F0
WinSet, TransColor, blue
gui, 1: -Caption -SysMenu +Owner -Resize
gui, 1: Show, Center
RETURN
f5::
Gui, Submit, NoHide
GuiControl, 1:, Txt1, %Name%
GuiControl, 1:, Txt2, %Number%
GuiControl, 1:Show, Txt1
GuiControl, 1:Show, Txt2
GuiControl, 1:Hide, Name
GuiControl, 1:Hide, Number
return
f6::
GuiControl, 1:Hide, Txt1
GuiControl, 1:Hide, Txt2
GuiControl, 1:Show, Name
GuiControl, 1:Show, Number
return |
Keeping a little of the edit fields background, not so nice cause of the missing rounded corners...but this could be solved with an appropriate background graphic. _________________ complx
“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime”—Author unknown |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Feb 03, 2010 7:39 am Post subject: |
|
|
Yes, it is a solution, thank you v.much!
I've thought about it, I just wanted another opinion or another approach.
Till then, I ll stick to your code, but Ive made some modification, because I like better when borders of edit boxes are also visible.
| Code: | background:="axpssplogo.png"
Gui, 1: Add, Picture, x0 y0 BackgroundTrans , %background%
Gui, 1: Add, Edit, vName x100 y80 -WantReturn
Gui, 1: Add, Text, cRed vTxt1 xp+3 yp+3 wp-6 hp-6 Hidden -BackgroundTrans
Gui, 1: Add, Edit, vNumber xp-3 yp+27 -WantReturn
Gui, 1: Add, Text, cRed vTxt2 xp+3 yp+3 wp-6 hp-6 Hidden -BackgroundTrans
Gui, 1: Color, blue
Gui, 1: +LastFound
Gui, Color,, F0F0F0
WinSet, TransColor, blue
gui, 1: -Caption -SysMenu +Owner -Resize
gui, 1: Show, Center
RETURN
f5::
Gui, Submit, NoHide
GuiControl, 1:Disable, Name
GuiControl, 1:Disable, Number
GuiControl, 1:, Txt1, %Name%
GuiControl, 1:, Txt2, %Number%
GuiControl, 1:Show, Txt1
GuiControl, 1:Show, Txt2
;GuiControl, 1:Hide, Name
;GuiControl, 1:Hide, Number
return
f6::
GuiControl, 1:Enable, Name
GuiControl, 1:Enable, Number
GuiControl, 1:Hide, Txt1
GuiControl, 1:Hide, Txt2
;GuiControl, 1:Show, Name
;GuiControl, 1:Show, Number
return |
|
|
| Back to top |
|
 |
The annoying bug! Guest
|
Posted: Wed Feb 03, 2010 8:31 am Post subject: |
|
|
Ahh!!!! ..the precious solution, "-BackgroundTrans "..
| Code: | background:="axpssplogo.png"
Gui, 1: Add, Picture, x0 y0 BackgroundTrans , %background%
Gui, 1: Add, Edit, vName x100 y80 -WantReturn -BackgroundTrans
Gui, 1: Add, Edit, vNumber yp+30 -WantReturn -BackgroundTrans
Gui, 1: Color, blue
Gui, 1: +LastFound
WinSet, TransColor, blue
gui, 1: -Caption -SysMenu +Owner -Resize
gui, 1: Show, Center
RETURN
f5::
GuiControl, 1:Disable, Name
GuiControl, 1:Disable, Number
return
f6::
GuiControl, 1:Enable, Name
GuiControl, 1:Enable, Number
return |
Solved |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Feb 03, 2010 10:41 am Post subject: |
|
|
| Sorry, but it's -Background |
|
| Back to top |
|
 |
The annoying bug! Guest
|
Posted: Wed Feb 03, 2010 3:26 pm Post subject: |
|
|
Guest, both works (-BackgroundTrans or -Background) |
|
| Back to top |
|
 |
complx
Joined: 22 Jan 2010 Posts: 34 Location: Germany
|
Posted: Wed Feb 03, 2010 8:06 pm Post subject: |
|
|
| The annoying bug! wrote: | Ahh!!!! ..the precious solution, "-BackgroundTrans "..
|
lol, all the playing with text fields and blind for beginning, I should not code past 8 p.m. *facepalm* _________________ complx
“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime”—Author unknown |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Feb 03, 2010 9:38 pm Post subject: |
|
|
| The annoying bug! wrote: | | Guest, both works... |
...I'm a different Guest, but -BackgroundRed would likely "work"...the point is the option is "Background", the color is "trans" & you don't need to specify a color when removing the option... |
|
| Back to top |
|
 |
nick
Joined: 24 Aug 2005 Posts: 549 Location: Berlin / Germany
|
Posted: Thu Feb 04, 2010 8:12 am Post subject: |
|
|
Yes, both "work", and even -BackgroundAndForeground and -BackgroundWhite, too. "Gracious" AHK will permit everything following the word "Background" in the options of an Edit control and take it as -Background.
That's why the option is _________________ nick  |
|
| 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
|