How to make a text control end with a space? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
afe
Posts: 615
Joined: 06 Dec 2018, 04:36

How to make a text control end with a space?

18 Jan 2019, 11:30

Hello,
How to make a text control end with a space?
The expected result is

Please enter your name: <There is a space here>

Thanks.

Code: Select all

Gui, Margin, 0, 0
Gui, Add, Text, section, Please enter your name: 
Gui, Add, Edit, ys vEdit
Gui, Show
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: How to make a text control end with a space?

18 Jan 2019, 11:43

A_Space or id imagine plain old space in a forced expression string would do
A_AhkUser
Posts: 1147
Joined: 06 Mar 2017, 16:18
Location: France
Contact:

Re: How to make a text control end with a space?  Topic is solved

18 Jan 2019, 13:13

I. Padding logic:

Code: Select all

Gui, Margin, 0, 0
Gui, Add, Text, section, % "Please enter your name: "
Gui, Add, Edit, ys vEdit
Gui, Show
return
II. Margin logic:

Code: Select all

offset := 10
Gui, Margin, % offset, 0
Gui, Add, Text, section, Please enter your name:
Gui, Add, Edit, ys vEdit
Gui, Margin, 0, 0
Gui, Show
return
III. Cue (alternative) logic:

Code: Select all

cue := "Please enter your name"
Gui, Add, Edit, hwndhEdit
SendMessage, 0x1501, true, &cue,, % "ahk_id  " . hEdit ; EM_SETCUEBANNER := 0x1501
Gui, Show
return
my scripts

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 375 guests