Adobe Dreamweaver Forums



Last 10 THreads :         Repeater and XML problem (Last Post : ntsiii - Replies : 2 - Views : 4 )           »          Focus, Browsers & Spry Accordion (Last Post : CORDFrank - Replies : 5 - Views : 6 )           »          Can't upload selected pdf's to remote server (Last Post : sw2gtg - Replies : 1 - Views : 2 )           »          Disabling menu bars in a browser window (Last Post : Alan - Replies : 3 - Views : 4 )           »          Navigation from Contact Form (Last Post : sw2gtg - Replies : 3 - Views : 4 )           »          CF8 Help in Dreamweaver CS3 (Last Post : A.J.cfm - Replies : 0 - Views : 1 )           »          SWF slide show does not play (Last Post : sw2gtg - Replies : 1 - Views : 2 )           »          Javahelp/Oracle Help (Last Post : cindys@ddms.com - Replies : 9 - Views : 10 )           »          FlashVars help (Last Post : Cgull - Replies : 2 - Views : 3 )           »          Quiz results and slide views (Last Post : dlspielman@gmail.com - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags: ,



Reply
  #1 (permalink)  
Old 08-26-2008, 12:58 AM
rwadkins_nyc
 
Posts: n/a
Diggs:
Default horizontalGap, maybe?

I've got this small app that lays Labels out in an HBox. I want to decrease
the space between the Labels, but can't seem to do it. Changing horizontalGap
on other containers seems to work the way i think it should, but not here. Any
suggestions?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
>

<mx:HBox
id="navGalleryListBox"
horizontalGap="0"
width="395"
height="18"
clipContent="True"
verticalScrollPolicy="off"
horizontalScrollPolicy="off"
verticalAlign="middle"
paddingTop="0"
paddingBottom="0"
>

<mx:Label
id="firstNAV"
text="1"
fontFamily="Century Schoolbook L"
fontSize="23"
paddingLeft="0"
paddingRight="0"
/>
<mx:Label
id="secondNAV"
text="2"
fontFamily="Century Schoolbook L"
fontSize="23"
paddingLeft="0"
paddingRight="0"
/>
</mx:HBox>
</mx:Application>



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-26-2008, 05:00 AM
Ratsnackbar
 
Posts: n/a
Diggs:
Default Re: horizontalGap, maybe?

Any reason you are using Label instead of Text?

The Text component will collapse to the size of what is in it but the label
will have space on the right which is where your extra space is coming from.

The label does this as part of it's standard formatting to allow it to stand
off a bit from whatever it is labeling without you having to add extra
formatting.

If you switch your labels to simply Text components I believe you will find
you get the effect you want.

Reply With Quote
  #3 (permalink)  
Old 08-26-2008, 05:47 PM
rwadkins_nyc
 
Posts: n/a
Diggs:
Default Re: horizontalGap, maybe?

Well, firstly because of this from
http://livedocs.adobe.com/flex/3/lan...rols/Text.html

[Q]The Text control displays multiline, noneditable text. Use the Label
control if you need only a single line of text. [/Q]

But Text seems unnecessarily complicated with the whole childnode thing.
(btw, can you tell I'm new to Flex?)

is the padding not adjustable on Label?

Reply With Quote


  #4 (permalink)  
Old 08-27-2008, 07:19 AM
Ratsnackbar
 
Posts: n/a
Diggs:
Default Re: horizontalGap, maybe?

I tip my hat to anyone who has actually read the livedocs first before posting
here. In most cases I would also suggested to follow the API.

In this case however I would still suggest using Text as long as you
understand how it will react if your HBox gets too small. I.E. it will wrap
unless you have set the width to a percentage.

Text subclasses Label but handles the space around itself the way I believe
you are thinking a label should.

The label control is more of a container that has text in it and the minimum
size of the container does not honor the dimensions of the font once the width
gets smaller then the height. Instead it just tends to end up square at that
point. Text control honors the spacing around the font of the item inside it.

So for example if there was a single character "1" in a label control with
your CSS options above the width of the label control itself will be the same
as the height of the character plus the top and bottom padding. But in a Text
control the width is the width of the font of the character plus the left and
right padding.

Not sure if that is how it was intended but in my experience that is how it
displays.

(Sorry did not intend to explain so much just to say I still would use text.)

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 05:53 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk