AutoIt Forums: GUI Hyperlink control - AutoIt Forums

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

GUI Hyperlink control Rate Topic: ***** 1 Votes

#1 User is offline   GaryFrost 

  • I don't need your attitude. I have one of my own
  • Icon
  • Group: Developers(Dev)
  • Posts: 7,854
  • Joined: 01-June 04
  • Gender:Male
  • Location:USA

Posted 14 March 2006 - 03:00 PM

Finally got this to work

Did this was just to see how it would be done.

Edit: added the ability to have the link in the control more than 1 time.
Edit: added the ability to have multiple links i.e. http for one link, mailto for another etc...
Edit: added the ability to set the font
Edit: added the visited link setting
Edit:
Working on making this a little more user friendly.
Put the events in it's own script
added _GuiCtrlHyperLinkFont function

Edit: added _GuiCtrlHyperLinkSetLink, _GuiCtrlHyperLinkGetLinkInfo
changed: GuiCtrlHyperLinkFont to GuiCtrlHyperLinkSetFont
note: visited flag gets set, but color doesn't change like it's suppose to.

Note: Min. Operating System WinXP

http://www.autoitscript.com/fileman/users/gafrost/HyperLink.gif



Events.au3

GuiHyperLink.au3

HyperLink_Example.au3

Enjoy!

Gary

This post has been edited by gafrost: 19 September 2006 - 01:42 AM


#2 User is offline   Valuater 

  • ”Hobbyist” a passionate enjoyable activist
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 10,868
  • Joined: 28-February 05
  • Location:Riverside, CA USA

Posted 14 March 2006 - 03:31 PM

very nice gary....

I knew you would get it done!


8)

#3 User is offline   GaryFrost 

  • I don't need your attitude. I have one of my own
  • Icon
  • Group: Developers(Dev)
  • Posts: 7,854
  • Joined: 01-June 04
  • Gender:Male
  • Location:USA

Posted 14 March 2006 - 04:40 PM

View PostValuater, on Mar 14 2006, 08:31 AM, said:

very nice gary....

I knew you would get it done!


8)


Thanks, I quickly improved on it a bit, seperated the gui from the control and created an example

also

added the ability to have multiple links i.e. http for one link, mailto for another etc...

see 1st post for files....

#4 User is offline   GaryFrost 

  • I don't need your attitude. I have one of my own
  • Icon
  • Group: Developers(Dev)
  • Posts: 7,854
  • Joined: 01-June 04
  • Gender:Male
  • Location:USA

Posted 15 March 2006 - 02:04 AM

Need to figure out how to change the font on the control, if anyone has done this any help would be appreciated.

Gary

#5 User is offline   GaryFrost 

  • I don't need your attitude. I have one of my own
  • Icon
  • Group: Developers(Dev)
  • Posts: 7,854
  • Joined: 01-June 04
  • Gender:Male
  • Location:USA

Posted 15 March 2006 - 05:12 AM

added the ability to set the font

see 1st post for files....

#6 User is offline   cdkid 

  • El Spamino
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 747
  • Joined: 03-January 06
  • Gender:Male
  • Location:Missouri

Posted 15 March 2006 - 07:10 PM

Is there any way to detect if the mouse is over a link & change the color and/or backgroundcolor? Or would you have to check mouse pos in your main messageloop?
~cdkid

#7 User is offline   GaryFrost 

  • I don't need your attitude. I have one of my own
  • Icon
  • Group: Developers(Dev)
  • Posts: 7,854
  • Joined: 01-June 04
  • Gender:Male
  • Location:USA

Posted 15 March 2006 - 07:17 PM

View Postcdkid, on Mar 15 2006, 12:10 PM, said:

Is there any way to detect if the mouse is over a link & change the color and/or backgroundcolor? Or would you have to check mouse pos in your main messageloop?
~cdkid


I'll be looking into that when I get time, also I'll be looking into adding a tooltip to the control.

Gary

#8 User is offline   Adam1213 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 133
  • Joined: 21-November 05
  • Location:Sydney, Australia

Posted 07 April 2006 - 04:09 AM

View Postgafrost, on Mar 15 2006, 11:04 AM, said:

Need to figure out how to change the font on the control, if anyone has done this any help would be appreciated.

Gary



Changing the colour... RTF plugin can do it

#9 User is offline   GaryFrost 

  • I don't need your attitude. I have one of my own
  • Icon
  • Group: Developers(Dev)
  • Posts: 7,854
  • Joined: 01-June 04
  • Gender:Male
  • Location:USA

Posted 07 April 2006 - 04:15 AM

View PostAdam1213, on Apr 6 2006, 10:09 PM, said:

Changing the colour... RTF plugin can do it


Whole different ballgame there, besides already figured out how to change the font.

#10 User is offline   Polyphem 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 125
  • Joined: 24-March 06

Posted 10 April 2006 - 11:26 AM

Very nice, thanks a lot for your work. Sadly it seems to colide with FileSelectFolder. Since I use your function, the Selection Pop-Up is not rendered correct anymore, it pops-up but the selection-tree is not visible any more FileSelectFolder("","",1,@scriptdir).

#11 User is offline   GaryFrost 

  • I don't need your attitude. I have one of my own
  • Icon
  • Group: Developers(Dev)
  • Posts: 7,854
  • Joined: 01-June 04
  • Gender:Male
  • Location:USA

Posted 10 April 2006 - 12:13 PM

View PostPolyphem, on Apr 10 2006, 05:26 AM, said:

Very nice, thanks a lot for your work. Sadly it seems to colide with FileSelectFolder. Since I use your function, the Selection Pop-Up is not rendered correct anymore, it pops-up but the selection-tree is not visible any more FileSelectFolder("","",1,@scriptdir).


Think you might want to check how your calling FileDialog

i.e.

[ code='text' ]    ( ExpandCollapse - Popup )
Opt("MustDeclareVars", 1) #include "GuiHyperLink.au3" _Main() Func _Main()     Local $GUI, $msg     Local $Links[2] = ["http://www.Autoitscript.com/forum", "mailto:custompcs@charter.net"]     Local $Link_On[2] = ["AutoIt Script home page", "UDF Maniac"]     $GUI = GUICreate("Hyper Link Test", 500, 250)     $hl_hwnd[0] = _GuiCtrlHyperLinkCreate ($GUI, _             'Welcome to the AutoIt Script home page - the home of AutoIt scripting and related applications.  Be sure to Check out AutoIt Script home page ', _             "http://www.Autoitscript.com/forum", "AutoIt Script home page", _             10, 10, 480, 40, $WS_DLGFRAME, $WS_EX_CLIENTEDGE)         ReDim $hl_hwnd[2]     $hl_hwnd[1] = _GuiCtrlHyperLinkCreate ($GUI,  _             'For Question/Suggestions e-mail: UDF Maniac of the AutoIt Forum', _             "mailto:custompcs@charter.net", "UDF Maniac", _             10, 60, 480, 20, -1, -1, "Arial", 14)         ReDim $hl_hwnd[3]     $hl_hwnd[2] = _GuiCtrlHyperLinkCreate ($GUI, _             'Welcome to the AutoIt Script home page - the home of AutoIt scripting and related applications.' & @LF & @LF & _             'For Question/Suggestions e-mail: UDF Maniac of the AutoIt Forum', _             $Links, $Link_On, _             10, 120, 480, 70, -1, $WS_EX_CLIENTEDGE, "Arial Bold", 12, 900, True, False, False)         Local $button = GUICtrlCreateButton("FileDialog",10,220,120,20)     GUISetState(@SW_SHOW) ;Register WM_NOTIFY  events     GUIRegisterMsg($WM_NOTIFY, "WM_Notify_Events")     While 1         $msg = GUIGetMsg()                 Select                         Case $msg = $GUI_EVENT_CLOSE                 Exit             Case $msg = $button                 Local $message = "Hold down Ctrl or Shift to choose multiple files."                 Local $var = FileOpenDialog($message, "C:\Windows\", "All (*.*)|Text files (*.txt)|Images (*.jpg;*.bmp)|Videos (*.avi;*.mpg)", 1 + 4 )                         EndSelect     WEnd EndFunc  ;==>_Main


#12 User is offline   Polyphem 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 125
  • Joined: 24-March 06

Posted 10 April 2006 - 01:07 PM

Thanks for your quick response gafrost. The FileOpenDialog works for me too, but FileSelectFolder does not.

This post has been edited by Polyphem: 10 April 2006 - 01:11 PM


#13 User is offline   GaryFrost 

  • I don't need your attitude. I have one of my own
  • Icon
  • Group: Developers(Dev)
  • Posts: 7,854
  • Joined: 01-June 04
  • Gender:Male
  • Location:USA

Posted 10 April 2006 - 01:27 PM

View PostPolyphem, on Apr 10 2006, 07:07 AM, said:

Thanks for your quick response gafrost. The FileOpenDialog works for me too, but FileSelectFolder does not.



Sorry, see what you mean, I'll look into it, should of had another cup of coffee before answering this morning.

Gary

#14 User is offline   GaryFrost 

  • I don't need your attitude. I have one of my own
  • Icon
  • Group: Developers(Dev)
  • Posts: 7,854
  • Joined: 01-June 04
  • Gender:Male
  • Location:USA

Posted 10 April 2006 - 01:33 PM

comment out line 212 in the include file

line should containe

[ code='text' ]    ( Popup )
Local $coint = DllCall('ole32.dll', 'long', 'CoInitializeEx', 'int', 0, 'long', $COINIT_DISABLE_OLE1DDE)


Looks like the hyperlink still works with-out that line, and the folderdialog also works.

#15 User is offline   Polyphem 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 125
  • Joined: 24-March 06

Posted 10 April 2006 - 01:53 PM

Perfect, works for me as desired :), thanks a lot gafrost.

#16 User is offline   jackyyll 

  • Spammer!
  • PipPipPip
  • Group: Full Members
  • Posts: 214
  • Joined: 04-April 05
  • Location:127.0.0.1

Posted 10 April 2006 - 06:38 PM

Just a question, cant you just like.. make a GUI, colored blue.. and do Case $msg = $linkbutton
launch broswer and navigate to site code here

or w/e ? :o

#17 User is offline   GaryFrost 

  • I don't need your attitude. I have one of my own
  • Icon
  • Group: Developers(Dev)
  • Posts: 7,854
  • Joined: 01-June 04
  • Gender:Male
  • Location:USA

Posted 10 April 2006 - 06:45 PM

View Postjackyyll, on Apr 10 2006, 12:38 PM, said:

Just a question, cant you just like.. make a GUI, colored blue.. and do Case $msg = $linkbutton
launch broswer and navigate to site code here

or w/e ? :o


yes you could, or a label, as was done in my old about example

but this way the whole control does not ack like a link, only the parts that need too.

#18 User is offline   elgabionline 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 108
  • Joined: 04-July 05
  • Location:Argentina (Santa Fe)

Posted 21 April 2006 - 01:47 PM

View Postgafrost, on Mar 14 2006, 11:00 AM, said:

Note: Min. Operating System WinXP

http://www.autoitscript.com/fileman/users/gafrost/HyperLink.GIF

Enjoy!

Gary



Hello! Do you have thought of the future that the program also works on Win98 SE?
(I living in the past...) lol

#19 User is offline   GaryFrost 

  • I don't need your attitude. I have one of my own
  • Icon
  • Group: Developers(Dev)
  • Posts: 7,854
  • Joined: 01-June 04
  • Gender:Male
  • Location:USA

Posted 21 April 2006 - 02:56 PM

View Postelgabionline, on Apr 21 2006, 07:47 AM, said:

Hello! Do you have thought of the future that the program also works on Win98 SE?
(I living in the past...) lol


The SysLink control is defined in the ComCtl32.dll version 6

#20 User is offline   uberis 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 13
  • Joined: 30-April 06

Posted 23 May 2006 - 10:01 AM

Hi there everybody,

is there any way to use this magnific GUI Hyperlink control with colouring and sizing the hyperlink itself, e.g.
the text is in size Arial 10 and coloured black, but I want to have the hyperlink to appear in size 12 and coloured red.

I tried to change the part in the GUIHyperlinkControl.au3 file where the anchor point is repleced with corresponding html commands to be included but did not get the result as expected, means the additional html commands are not used but displayed as text of the link itself.

Greetings Harald

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users