Jump to content

Missing Underlines


Aratorin
 Share

Recommended Posts

Please help! I'm writing a script to download a command-line program, and then use a gui to configure it. Everything is going well, except that I decided that I wanted to enable the user to be able to either click the buttons in the various guis, or to use hotkeys, like a typical widows gui would. I've got the hotkeys working correctly, but for some reason, the underlines for my letters aren't showing up. They show up just fine until I add the hotkeyset and func codes, but then they vanish. Here is an example of the code that is having issues

Global Const $GUI_SS_DEFAULT_GUI = BitOR(0x00020000, 0x00C00000, 0x80000000, 0x00080000)
Func yYes()
    ControlClick($exists, "", $existsyes)
EndFunc
Func nNo()
    ControlClick($exists, "", $existsno)
EndFunc

$exists = GUICreate("", 300, 110, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, 0x10000000))
GUICtrlCreateLabel('Do you already have the newest version of exampleprogram saved in a folder called "ExampleProgram" on your desktop?', 10, 10, 280, 40)
$existsyes = GUICtrlCreateButton("&Yes", 80, 70, 50, 30)
$existsno = GUICtrlCreateButton("&No", 170, 70, 50, 30)
WHILE 1
    HotKeySet("y")
    HotKeySet("n")
    While WinActive($exists)
        HotKeySet("y", "yYes")
        HotKeySet("n", "nNo")
        $existschoice = GUIGetMsg()
        If $existschoice = $existsyes Then ExitLoop 2
        If $existschoice = $existsno Then ExitLoop 2
    WEnd
WEnd
GUIDelete($exists)
HotKeySet("y")
HotKeySet("n")

For some reason, my buttons look like this:

Posted Image

Can anyone tell me why the underlines for Y and N aren't appearing?

:Update:

It seems that if I launch my script by selecting it on my desktop and hitting enter, my underlines are there, but if I launch it by double clicking, they aren't there. The same thing happens whether my script is compiled or not. Any ideas on why this is happening?

Edited by Aratorin
Link to comment
Share on other sites

...

It seems that if I launch my script by selecting it on my desktop and hitting enter, my underlines are there, but if I launch it by double clicking, they aren't there. The same thing happens whether my script is compiled or not. Any ideas on why this is happening?

Surely, the underline it's there. Press ALT key to see it.
Link to comment
Share on other sites

Surely, the underline it's there. Press ALT key to see it.

Ah, now it shows up. Is there anyway to get around having to hit the Alt key? I tried adding:

Send("!")

after creating the gui, but it didn't do anything.

Edited by Aratorin
Link to comment
Share on other sites

That's actually a windows setting too (in XP at least).

Go to your Display Properties: Appearance Tab -> Hit the Effects button -> Bottom Checkbox

Edited by spudw2k
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...