 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Tue Feb 01, 2005 6:20 am Post subject: Border style can |
|
|
I tested the latest version 1.0.25.11
I couldn't get a border around a picture control with an icon or a button control. Is this due to my code, see below? All pictures have gaps of 7 pixels to their neighbours. If the border is default, it is drawn, but isn't removed with "GuiControl, -Border, ButtonXYZ" either.
| Code: | Gui, +ToolWindow
Gui, Add, Picture, vComboBox gCombobox x7 y7, ComboBox_16x16.ico
Gui, Show, , Add Control Toolbox
;[...]
Combobox:
GuiControl, +Border, Combobox
return
|
If someone needs the icon for testing let me know where to send it. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Tue Feb 01, 2005 2:20 pm Post subject: |
|
|
There are two issues at work here.
1) When the border is added to an existing picture, it won't appear because there is no room in the control to show it. To work around this, increase the size of the control by one pixel after adding the border:
GuiControl, Move, MyPic, w33 h33
2) When removing the border from a control that's currently showing one, the window does not properly repaint. This is because it's difficult to properly repaint every conceivable change in control styles without repainting the entire window every time, which would probably be undesirable. To work around this, use the following after removing the border:
Gui Hide
Gui Show
If the above causes too much screen flicker, there might be a message you can send with PostMessage instead. You could also reload the picture entirely via GuiControl,, MyPic, C:\My Icon.ico |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Tue Feb 01, 2005 3:21 pm Post subject: |
|
|
Thank you for the answer,
I tried
| Code: | Gui, hide
Gui, show |
And you are right it causes too much flicker of the GUI.
I tried also
| Code: | GuiControl, +Border, ArrowN
PostMessage, 0x0B, , , ArrowN, A |
but is doesn't do the job either, but maybe I have the Postmessag wrong.
Now I will test the resize, although I do not understand why it has to be 1 pixel larger, isn't there enough space for it when the next picture is 7 pixel away? I do not like the resize, I fear that it will screw up the alignment. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Tue Feb 01, 2005 3:37 pm Post subject: |
|
|
The resize works well for this problem,
Thanks a lot for the help.
The resize only resizes the control and doesn't influence the position of the other controls. _________________ Ciao
toralf  |
|
| 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
|