rudika Posted February 2, 2006 Posted February 2, 2006 (edited) moin, moin...!Does anyone know if and how it is possible to embed an URL-hyperlink, maybe with GUICtrlCreateIcon or GUICtrlCreateLable. I´d like to use it in my synchro tool. I always found every answer to all my questions within AutoIt.chm, but now I didn´t found anything about that case. Also there is no topic about this subject here in this forum.Apart from that, is there a possible to create a button without borders and 3D-design? For that too, I didn´t found a Style or exStyle code in the appendix.Thanks a lot Edited February 2, 2006 by rudika [font="Comic Sans Ms"][center]Powered by AutoIt3http://www.wik-eric.de/zips/Synchro2.2.2-4free.zip[/center][/font]
Moderators big_daddy Posted February 2, 2006 Moderators Posted February 2, 2006 This will give you an idea on how to create a hyperlink: expandcollapse popup#include <GUIConstants.au3> GUICreate("Link..", 200, 150, -1, -1) $LABEL = _GuiCtrlCreateHyperlink("Website Link", 60, 75, 90, 20, 0x0000ff, "This is a website...") GUISetState() While 1 $MSG = GUIGetMsg() Select Case $MSG = $GUI_EVENT_CLOSE Exit Case $MSG = $LABEL Run("explorer.exe http://google.com") EndSelect WEnd ;=============================================================================== ; ; Function Name: _GuiCtrlCreateHyperlink() ; Description: Creates a label that acts as a hyperlink ; ; Parameter(s): $s_Text - Label text ; $i_Left - Label left coord ; [$i_Top] - Label top coord ; [$i_Width] - Label width ; [$i_Height] - Label height ; [$i_Color] - Text Color ; [$s_ToolTip] - Hyperlink ToolTip ; [$i_Style] - Label style ; [$i_ExStyle] - Label extended style ; ; Requirement(s): None ; Return Value(s): Control ID ; ; Author(s): Saunders <krawlie@hotmail.com> ; ;=============================================================================== Func _GuiCtrlCreateHyperlink($s_Text, $i_Left, $i_Top, $i_Width = -1, $i_Height = -1, $i_Color = 0x0000ff, $s_ToolTip = '', $i_Style = -1, $i_ExStyle = -1) Local $i_CtrlID $i_CtrlID = GUICtrlCreateLabel($s_Text, $i_Left, $i_Top, $i_Width, $i_Height, $i_Style, $i_ExStyle) If $i_CtrlID <> 0 Then GUICtrlSetFont($i_CtrlID, -1, -1, 4) GUICtrlSetColor($i_CtrlID, $i_Color) GUICtrlSetCursor($i_CtrlID, 0) If $s_ToolTip <> '' Then GUICtrlSetTip($i_CtrlID, $s_ToolTip) EndIf EndIf Return $i_CtrlID EndFunc ;==>_GuiCtrlCreateHyperlink
rudika Posted February 2, 2006 Author Posted February 2, 2006 This will give you an idea on how to create a hyperlink: expandcollapse popup#include <GUIConstants.au3> GUICreate("Link..", 200, 150, -1, -1) $LABEL = _GuiCtrlCreateHyperlink("Website Link", 60, 75, 90, 20, 0x0000ff, "This is a website...") GUISetState() While 1 $MSG = GUIGetMsg() Select Case $MSG = $GUI_EVENT_CLOSE Exit Case $MSG = $LABEL Run("explorer.exe http://google.com") EndSelect WEnd ;=============================================================================== ; ; Function Name: _GuiCtrlCreateHyperlink() ; Description: Creates a label that acts as a hyperlink ; ; Parameter(s): $s_Text - Label text ; $i_Left - Label left coord ; [$i_Top] - Label top coord ; [$i_Width] - Label width ; [$i_Height] - Label height ; [$i_Color] - Text Color ; [$s_ToolTip] - Hyperlink ToolTip ; [$i_Style] - Label style ; [$i_ExStyle] - Label extended style ; ; Requirement(s): None ; Return Value(s): Control ID ; ; Author(s): Saunders <krawlie@hotmail.com> ; ;=============================================================================== Func _GuiCtrlCreateHyperlink($s_Text, $i_Left, $i_Top, $i_Width = -1, $i_Height = -1, $i_Color = 0x0000ff, $s_ToolTip = '', $i_Style = -1, $i_ExStyle = -1) Local $i_CtrlID $i_CtrlID = GUICtrlCreateLabel($s_Text, $i_Left, $i_Top, $i_Width, $i_Height, $i_Style, $i_ExStyle) If $i_CtrlID <> 0 Then GUICtrlSetFont($i_CtrlID, -1, -1, 4) GUICtrlSetColor($i_CtrlID, $i_Color) GUICtrlSetCursor($i_CtrlID, 0) If $s_ToolTip <> '' Then GUICtrlSetTip($i_CtrlID, $s_ToolTip) EndIf EndIf Return $i_CtrlID EndFunc ;==>_GuiCtrlCreateHyperlink yaaah... that´s what I wanted [font="Comic Sans Ms"][center]Powered by AutoIt3http://www.wik-eric.de/zips/Synchro2.2.2-4free.zip[/center][/font]
blademonkey Posted July 29, 2008 Posted July 29, 2008 yaaah... that´s what I wantedThis is great.Is it possible to make a portion of the control hyperlinked and the rest, leave it as regular text? ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now