![]() |
|
Published 1998-08-01 Printer-friendly version
I am using Internet Connect and I want to use autospotted hyperlinks. I would prefer that they display some text instead of the URL. The Autospot feature displays something like http://mydomain.com/mypage.htm. I want it to display "Visit My Web Page" and link to that URL? What can I do?
The answer is simple: Let the Clarion Java Applet do it for you!
The Java string control and the Java list controls have built-in capabilities to do exactly what you want. Each determines the display based on the data it is called upon to display. If the data contains a string that is formatted in a special manner, it displays some text and links to a URL.
To work in this manner, the data must contain a valid URL followed by the display text enclosed in angle brackets (< >). For example http://www.topspeed.com<Visit the TopSpeed Web Site> will display Visit the TopSpeed Web Site while a click on the control will send the user to www.topspeed.com.
You can use this feature in a number of ways. Of course, you can have a data field which contains data formatted exactly as you want it, but that requires users to know how to enter the data. A better way is to use two fields-one for the URL and the other for the display text, then using concatenation build a string for the Java String control to use.
For example:
LOC:URLLink = FIL:URL & '<<' & CLIP(FIL:URLDisplayText) & '>'
Notice that the left angle bracket (<) is duplicated. This is required to handle this special character.
You can also use this technique for a filed displayed in a BrowseBox control. Just populate the local variable and create a formula similar to the one above to assign its value. One caveat: The opening angle bracket must adjoin the URL; there can be no spaces in between.
I have a BrowseBox control and want to use VCR buttons. My only problem is that I do not want the ? button. Is there any way to delete this portion of the VCR controls? I know it is possible because I saw a Clarion application without the ? button, I just feel helpless because I cannot figure out how to use it in my application.
Don't feel bad. Many people are helpless when it comes to VCRs. Just the other day, I was at a friend's house and her VCR was flashing 12:00, 12:00. 12:00....
Seriously, there is a simple way to accomplish what you want. You just have to change your point of reference. My favorite point of reference is the Language Reference. And it is that book which contains the answer to your question.
According to the Language Reference, there is a difference between the VCR attribute and PROP:VCR.. In most cases, attributes and runtime properties are the same, but a few (like this one) are different.
According to the LR:
"To avoid displaying the ? button, you may set PROP:VCR to TRUE instead of adding the VCR attribute to the LIST or COMBO control declaration."

So that is your answer. Remove the VCR attribute and use the runtime property assignment instead.
Is it possible to create transition effects for the Wallpaper of an Application frame? If so, how?
There is actually quite a lot you can do with wallpaper... And you won't need any of that messy wallpaper paste!
Let's consider one simple transition effect--a fade-in effect. You can easily create this effect by changing the wallpaper every few seconds when the window opens. For example:
LOOP 4 times
TIME# = CLOCK() !pseudo timer
LOOP UNTIL CLOCK() > TIME# + 100 !forces delay, adjust as needed
DISPLAY
END
State# +=1
EXECUTE State#
appframe{PROP:wallpaper}='Bkgnd1.gif'
appframe{PROP:wallpaper}='Bkgnd2.gif'
appframe{PROP:wallpaper}='Bkgnd3.gif'
appframe{PROP:wallpaper}='Bkgnd4.gif'
END
END
Another effect you may consider is a different wallpaper for each day of the week. This provides some variety in the application and some purpose for the difference. In other words, the wallpaper actually conveys some information.
For example:
EXECUTE TODAY() % 7 !Determine what day of week it is
appframe{PROP:wallpaper}='mon.gif'
appframe{PROP:wallpaper}='tues.gif'
appframe{PROP:wallpaper}='weds.gif'
appframe{PROP:wallpaper}='thurs.gif'
appframe{PROP:wallpaper}='fri.gif'
appframe{PROP:wallpaper}='sat.gif'
ELSE
appframe{PROP:wallpaper}='sun.gif'
END
These example should get you started on your application's interior decorating.
Submit your questions to jim-d@topspeed.com
Copyright © 1999-2008 by CoveComm Inc. All Rights Reserved. Reproduction in any form without the express written consent of CoveComm Inc., except as described in the subscription agreement, is prohibited.
Clarion Magazine ISSN 1718-9942
One year: $189
(includes all back issues since '99)
Renewals from $139
Two years: $289
Renewals from $239