Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7916961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:59:17+00:00 2026-06-03T14:59:17+00:00

Here’s a self-contained application you can run that illustrates my question. When using a

  • 0

Here’s a self-contained application you can run that illustrates my question. When using a LinkButton in Flex spark DataGrid to display a clickable URL, the URL text that is displayed runs into it’s neighboring column if the URL’s column width becomes too short (i.e. possibly adjusted by user). If you run the code below, here’s what you’ll see:

enter image description here

Anyone know how to improve on this? Ideally the URL text would be truncated to fit within its column’s width and a tooltip would display whenever this truncation occurs (e.g. similar to a spark Label property showTruncationTip="true"). What do people do in practice?

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
   xmlns:s="library://ns.adobe.com/flex/spark" 
   xmlns:mx="library://ns.adobe.com/flex/mx"
   minWidth="300" minHeight="300">
   <fx:Declarations>
     <!-- Define the data -->
     <fx:XMLList id="siteList">
       <site> <name>IMDB</name> <url>http://www.imdb.com</url> </site>
       <site> <name>BoardgameGeek</name> <url>http://www.boardgamegeek.com</url> </site>
       <site> <name>Yahoo! Finance</name> <url>http://finance.yahoo.com</url> </site>
     </fx:XMLList>
     <!-- Use an XMLListCollection for the Spark DataGrid -->
     <s:XMLListCollection id="siteList2" source="{siteList}"/>
  </fx:Declarations>
  <s:layout> <s:VerticalLayout/> </s:layout>
  <s:Panel title="Spark DataGrid Links" width="300" height="300"
      horizontalCenter="0" verticalCenter="0">
    <s:DataGrid id="sparkDataGrid"
        width="100%" height="100%"
        dataProvider="{siteList2}">
        <s:columns>
            <s:ArrayList>
                <s:GridColumn dataField="url" headerText="URL" width="150"  itemRenderer="myItemRenderer"/>
                <s:GridColumn dataField="name" headerText="Name"/>
            </s:ArrayList>
        </s:columns>
    </s:DataGrid>
  </s:Panel>    
</s:Application>

And the file titled myItemRenderer.mxml (located in the same directory) is:

<?xml version="1.0" encoding="utf-8"?>
  <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
    xmlns:s="library://ns.adobe.com/flex/spark" 
    xmlns:mx="library://ns.adobe.com/flex/mx" >

  <s:HGroup height="25" verticalAlign="middle" horizontalAlign="left">
    <mx:LinkButton label="{data.url}" 
       textDecoration="underline" 
       textRollOverColor="0x7777FF" 
       click="navigateToURL(new URLRequest(data.url))" 
       width="100%" 
       labelPlacement="left" 
       color="0x0000DD"/>       
  </s:HGroup>
</s:GridItemRenderer>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:59:18+00:00Added an answer on June 3, 2026 at 2:59 pm

    One way to improve on this–not truncate and show on tooltip as desired–is to set clipAndEnableScrolling to true in your GridItemRenderer.

    <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:s="library://ns.adobe.com/flex/spark" 
        xmlns:mx="library://ns.adobe.com/flex/mx" 
        clipAndEnableScrolling="true">
    

    This will force the link to not exceed its allowed viewport, so the text won’t cover up your other column text. In a few minutes of experimentation I was not able to force it to truncate and show on tooltip.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the deal: I'm in the process of planning a mid-sized business application that
Here is a complete example. I want to forbid using A::set from objects casted
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Here's what I'm trying to accomplish with this program: a recursive method that checks
Here my problem: @Assert\Regex( * pattern=/^[A-Za-z0-9][A-Za-z0-9\]*$/, * groups={creation, creation_logged} * ) I'm using the
Here is the problem that I am trying to solve. I have two folders
Here is the code I'm using inside my AsyncTask DefaultHttpClient httpClient = new DefaultHttpClient();
Here's a query that works fine: SELECT rowid as msg_rowid, a, b, c FROM
Here is my code sample, let me know if it can be further improved?
Here is my code (Say we have a single button on the page that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.