DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Barca Guest

    Help - text on Hover Button


    I have created a hover button using an applet, but the text is too wide for
    the button and I wish to split it into two lines.
    How do I do this?

    app tag removed
    <!--- applet code="fphover.class" codebase="./" width="120" height="40">
    <param name="textcolor" value="#FFFFFF">
    <param name="text" value="This line is too long">
    <param name="effect" value="glow">
    <param name="url" valuetype="ref" value="LookUpMenuTest.htm">
    <param name="color" value="#FF0000">
    <param name="hovercolor" value="#FFFF00">
    </applet>
    <!--- --->

    The following does not work:
    <param name="text" value="This line is"+<br>+"too long">


  2. #2
    Michael Guest

    Re: Help - text on Hover Button


    Barca,

    I'm not overly familiar with these applets but I've had a similar situation
    in VB and solved it using a constant for carriage return line feed. vbCrLf.
    If available to you I would concat that in your value.

    Michael

    "Barca" <webdev.@127.0.0.1> wrote:
    >
    >I have created a hover button using an applet, but the text is too wide

    for
    >the button and I wish to split it into two lines.
    >How do I do this?
    >
    >app tag removed
    > <!--- applet code="fphover.class" codebase="./" width="120" height="40">
    > <param name="textcolor" value="#FFFFFF">
    > <param name="text" value="This line is too long">
    > <param name="effect" value="glow">
    > <param name="url" valuetype="ref" value="LookUpMenuTest.htm">
    > <param name="color" value="#FF0000">
    > <param name="hovercolor" value="#FFFF00">
    > </applet>
    > <!--- --->
    >
    >The following does not work:
    > <param name="text" value="This line is"+<br>+"too long">
    >



  3. #3
    Kevin Guest

    Re: Help - text on Hover Button


    Hi Barca,

    Try using this:

    <param name="text" value="This line is \n too long">

    Java uses "\n" to start a new line. This might work in your case.

    Kevin
    Webmaster - JavaScript Solutions
    http://www.javascriptsolutions.com


    "Barca" <webdev.@127.0.0.1> wrote:
    >
    >I have created a hover button using an applet, but the text is too wide

    for
    >the button and I wish to split it into two lines.
    >How do I do this?
    >
    >app tag removed
    > <!--- applet code="fphover.class" codebase="./" width="120" height="40">
    > <param name="textcolor" value="#FFFFFF">
    > <param name="text" value="This line is too long">
    > <param name="effect" value="glow">
    > <param name="url" valuetype="ref" value="LookUpMenuTest.htm">
    > <param name="color" value="#FF0000">
    > <param name="hovercolor" value="#FFFF00">
    > </applet>
    > <!--- --->
    >
    >The following does not work:
    > <param name="text" value="This line is"+<br>+"too long">
    >



  4. #4
    Ste Guest

    Re: Help - text on Hover Button



    >
    >The following does not work:
    > <param name="text" value="This line is"+<br>+"too long">
    >

    That's because you're passing an HTML code to a Java applet. I don't know
    if this will work(the applet may not support it), but give it a try....

    <param name="text" value="This line is\ntoo long">

    \n is the newline character... but as I said, it depends on how the applet
    will handle it.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links