AutoHotkey Community

It is currently May 27th, 2012, 11:33 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: August 21st, 2005, 1:14 am 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi,

if I have installed the OSX-Skin Flyakite OSX for Windows XP there are problems with GUI-Buttons. They loose the last character even if the button is very big.

This code ...
Code:
Gui, Add, Button, w100, OK
Gui, Add, Button, w200, Button
Gui,Show, W250 H100

... looks like this ...
Image

Interesting that this problem is not with MsgBox or the most other applications.

Flyakite can be downloaded at: http://osx.portraitofakite.com
Be warned: It makes hughe modifications to your system.

Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2005, 12:37 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
That's pretty strange and I think someone else once mentioned something about the last letter being cut off when the system font settings are non-standard.

I've a feeling this has something to do with the buttons styles. You could try adding -Wrap, +Left, and/or +Right to the button's options (minus Wrap is especially likely because it's the only atypical style AutoHotkey uses). Also try increasing the button's height.

If that doesn't fix it (and assuming it's still something to do with styles), comparing the style of a correct button with an incorrect one might provide insight. Perhaps Winspector Spy or a similar tool can report a button's styles in a more readable way than "ControlGet Style".


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2005, 1:59 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi,

thanks, -Wrap helps, is there a way to make it default?

Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2005, 5:52 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
There is currently no way to do default styles, but it might go into a future version. You probably know that you can put your defaults into a variable to improve the maintainability of the script:

ButtonOptions = -Wrap Left
Gui, Add, Button, %ButtonOptions% Default, OK
Gui, Add, Button, %ButtonOptions%, Cancel


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 20th, 2005, 4:38 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi Chris,

are the any plans to make -Wrap default? I have to add it to every control to avoid wrapping on skinned windows-systems.

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 20th, 2005, 5:27 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Changing the default would break existing scripts that rely on multi-line buttons. However, perhaps the default can be changed whenever the button's text doesn't contain any LF or CR characters. Does this affect only pushbuttons? Are GroupBoxes, radios, and checkboxes okay?

The "wrap" keyword adds the BS_MULTILINE style to a button, which I believe has been a standard style in Windows for nearly 15 years. Any skin or theme that doesn't work with it flawed (or there is an OS bug somewhere). I guess I'm expressing annoyance that AutoHotkey and other programs must add code to work around the bad behavior of other apps such as the shells you mentioned and the MS Word clipboard issue. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 20th, 2005, 5:38 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi,

then something other must go wrong in AHK, because it's the only program with these problems under those themes. I don't know how AHK calculates its sizes for controls, maybe adding 1 or 2 pixel to the calculated value could help. My question was not about a real default but more like a "SetGuiDefaultWrapping, Off", if it is possible.

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 20th, 2005, 5:41 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Are you saying that making the button explicitly wider solves the issue? You said earlier that the bug occurs no matter how wide you make the button; that is, even if there's lots of blank space on the left and right (the screenshots at the top support this).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 20th, 2005, 5:49 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi Chris, you're right, but I thougt there must be a second frame around the text only where the wrapping depends on.

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 20th, 2005, 6:00 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
There does appear to be such a frame, but I don't know where it comes from (there is an EM_SETRECT for Edit controls, but I've found nothing similar for buttons).

By the way, I edited my post above while you were editing yours. I added: "...perhaps the default can be changed [to be "no wrap"] whenever the button's text doesn't contain any LF or CR characters. Does this affect only pushbuttons? Are GroupBoxes, radios, and checkboxes okay?"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 20th, 2005, 8:26 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi,

setting the default to no-wrap if there is no CR/LF is not so clever, because that's the sense of wrapping, not to use CR/LF.

The problem is also for Checkboxes ...

Image

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 20th, 2005, 10:07 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Tekl wrote:
setting the default to no-wrap if there is no CR/LF is not so clever, because that's the sense of wrapping, not to use CR/LF.
Thanks. Scratch that idea :?. Maybe the following rule will work instead:

Turn off wrapping (by default) for each button that: 1) has no explicit width; 2) has no explicit height/rows (or specifies 1 or less for rows); 3) has no CR/LF in its text (testing shows that "wrap" is required for CR/LF to work properly).

If the above proves insufficient, I'll consider your other suggestion of having some kind of global option for it.

Quote:
The problem is also for Checkboxes ...
Then I imagine it affects radio buttons too. Does making the checkbox/radio explicitly wider fix the issue (unlike buttons)? Thanks for testing it.

Finally, perhaps you could send a bug report to the creators of this shell in case its something they can or should fix.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2005, 10:04 am 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi,

I don't like such themes for myself and I don't want to kill my system again, so I can only tell what others say. It's not only with Flyakite OS X but also with some other thema-apps. One user reported me, that using the Font Microsoft Sans Serif instead of Verdana would fix it.

Quote:
Turn off wrapping (by default) for each button that: 1) has no explicit width; 2) has no explicit height/rows (or specifies 1 or less for rows); 3) has no CR/LF in its text (testing shows that "wrap" is required for CR/LF to work properly).


1. As it also happens with fixed widht-buttons, that's no solution
2. That's better. R1 should also not wrap if no CR/LF
3. Ok, CR/LF should always enable Wrap.

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2005, 11:38 am 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi,

the user mailed me the link to the skin.

http://nontroppo.org/test/Op7/BreezeGUI.zip

It's very easy to use and also to remove, just two batch-files.

Changing the width of the checkboxes does help avoiding the wrap, but also -Wrap helps.

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2005, 12:56 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks for the new info and the skin. I'll see what can be done.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group