Jump to content

(BUG) Button access key (Alt+Letter) underlining with AutoIt GUIs


TMXOD
 Share

Recommended Posts

Because I was bored, I took upon my little brother's challenge of creating a countdown for his birthday. The code runs fine, but I am having problems with a minor cosmetic feature: the text of the button that starts and stops the countdown timer changes depending on what clicking the button would do.

When creating the button with GUICtrlCreateButton, I set the access key by adding the ampersand ('&') character before the key I want to set as the access key. I do the same when using GUICtrlSetData to change the button's text. The problem is that sometimes the underlining appears and sometimes it does not.

Any Ideas?

The entire source code (for context) is in the attached file, as the code is too long to post here.

cdown.au3

Pictures for clarification:

with underlining: post-6280-1167796408_thumb.jpg

without underlining: post-6280-1167796699_thumb.jpg

I've noticed that the underlining comes back when pressing the Alt key, but my Windows settings say to always display the access key, [sarcasm]so the problem must lie in AutoIt, as we all know that Windows has no bugs, right.... :P [/sarcasm]

The problem occurs when the script is interpreted through AutoIt3.exe and when compiled with Aut2exe.exe.

Can anyone else replicate the problem? if you can, post here, so I can have proof of the bug's existence when filing the bug report.

Link to comment
Share on other sites

In this case, where the user interface is simple, and nothing but numbers are used for input, and the access key is changed for itself (from Start to Stop), the risk of missing keypresses is negligible. The fact of the matter is that it looks like AutoIt is at fault, given that I've made similar code to this in VB6, VB.NET, Java (both Swing and SWT), but not C/C++/C#(since GUI programming in these languages is painful), and Windows always showed the access key, even after changing the button text and the access key.

Edited by DaProber
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...