Page 1 of 1

GUI: is it possible to add a link into an edit?

Posted: 04 Mar 2018, 13:31
by partof
Hi,

I'm want to add some <a> links into this gui (I don't fully understand how it works but it does)

Code: Select all

gui, add, Edit, ReadOnly h400 vEditField,
When I try that:

Code: Select all

gui, add, Link,, Edit,  ReadOnly h400 vEditField,
The link works but I lose the scrollbar and the windows size.

Any idea how to solve this?

Re: GUI: is it possible to add a link into an edit?

Posted: 04 Mar 2018, 13:35
by gregster
Thta's not the right syntax, I suppose. Compare with the docs: https://autohotkey.com/docs/commands/Gu ... s.htm#Link

Re: GUI: is it possible to add a link into an edit?

Posted: 04 Mar 2018, 13:42
by partof
yes, they don't seem to be compatible, the only way seems to add my links at the beginning or at the end of the Gui (but not too many because I can't scroll them down )

Re: GUI: is it possible to add a link into an edit?

Posted: 04 Mar 2018, 14:48
by garry
if you want start many links ( instead edit ) can use listbox or listview

Code: Select all

#warn
#NoEnv
SendMode, Input
SetWorkingDir, %A_ScriptDir%
e:="
(Ltrim join|
https://www.theguardian.com/
https://www.dr.dk/radio/
https://news.google.com/news/headlines?hl=nl
http://thesciencepost.com/
"
)

GUI,2:+AlwaysOnTop
Gui,2: Color, ControlColor, Black
Gui,2: Font, CDefault, FixedSys
Gui,2:Add, ListBox, x5     y10   w680 h300 cYellow gRun1 vLB1a,%e%
GUI,2:show, NA W700 H320 X20 Y0,Test
;gosub,a1
return
;----------------------------------------------------------
2GuiClose:
ExitApp
;----------
;---------------------
;- open folder when click in listbox
Run1:
Gui,2: Submit, Nohide
run,%lb1a%
return
/*
;-- show all folder in listbox
a1:
fd1=%a_desktop%
Loop, Files, %fd1%,D
    e .= A_LoopFileFullPath "|"
GuiControl,2:,LB1a,%e%
return
*/
;===============================================================

Re: GUI: is it possible to add a link into an edit?

Posted: 04 Mar 2018, 15:22
by partof
thank you Garry!

(and also for the links! We share the same taste, if only I was born in Danemark, you guys are awesome!)