New topic: Total n00b Question - Need About window txt to link to URL
<http://forums.realsoftware.com/viewtopic.php?t=46861> Page 1 of 1 [ 4 posts ] Previous topic | Next topic Author Message otosnede Post subject: Total n00b Question - Need About window txt to link to URLPosted: Thu Feb 07, 2013 12:47 pm Joined: Thu Feb 07, 2013 12:45 pm Posts: 3 I can't for the life of me figure out how to format a text in a Label object to show as an underlined link that will open a web browser with the designated URL... anyone throw me a bone on this one? (: Top p0wn3d Post subject: Re: Total n00b Question - Need About window txt to link to UPosted: Thu Feb 07, 2013 1:27 pm Joined: Sun Oct 28, 2012 4:54 am Posts: 167 Location: Herts, UK Drag a text label onto a form. Using the properties editor pane on the right hand side of the IDE under appearance change your text to "whatever.you.wish" then under font setting select underline. //Mouse Enter Me.MouseCursor=System.Cursors.FingerPointer me.textcolor=&c0000FF //MouseExit me.textcolor=&c000000 //MouseDown ShowURL "http://www.someURL.com" _________________ Real Studio 2012 R2 SysInfo BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD Top charonn0 Post subject: Re: Total n00b Question - Need About window txt to link to UPosted: Thu Feb 07, 2013 1:31 pm Joined: Mon Apr 02, 2007 2:08 am Posts: 1111 Location: San Francisco, CA, USA Set the color and default underline state of a Label control using the window designer. Then, in the MouseDown event of the Label, put something along these lines: Function MouseDown(X As Integer, Y As Integer) As Boolean ShowURL("http://www.example.com") End Function This will give you a basic clickable Label-based link. You can embellish it using other events (e.g. change the color in the MouseEnter event and then change it back in the MouseExit event.) _________________ Boredom Software Top otosnede Post subject: Re: Total n00b Question - Need About window txt to link to UPosted: Thu Feb 07, 2013 1:43 pm Joined: Thu Feb 07, 2013 12:45 pm Posts: 3 Awesome, thanks for the replies... combination of the two solutions worked for me! Was looking for a simple answer in the documentation, but didn't find one Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 4 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
