Hi,

Simple fix now that I see what you are talking about.

I took a screen shot of you form, measured the button exactly.

15 pixels height?
13 pxiels font size?

using this in css

       Button {
           paddingTop:-2;
           paddingBottom:0;
       }

The label text on the button is perfectly centered.

As far as the textinput and combo box, you would need to extend the class.

With something to the effect of.

package
{
import mx.controls.TextInput;

[Style(name="paddingTop", type="Number")]

public class TextInputExtension extends TextInput
{

   /**
    *  @private
    */
   override protected function updateDisplayList(unscaledWidth:Number,

unscaledHeight:Number):void
   {
       super.updateDisplayList(unscaledWidth, unscaledHeight);

       var paddingTop:Number = getStyle("paddingTop");

       textField.y += -2//paddingTop;
       textField.height += 5
   }
}
}

Yes, this is a deficiencies of the framework. But I would ask this for a
feature enhancement of the controls to HONOR all 4 paddings in
updateDisplayList() and measure().

So, bottom line is if you 'want' those small features, you will have to code
them yourself.

I know for a fact taht Adobe tries to do things that a majority of
developers will use. As far as I know you are the first that has brought up
setting control size smaller that the conventions.

I do think Adobe needs to be consistent with all controls enabling padding
on all sides so you can use css to do negetive psotions of the composited
controls.

Peace, Mike




On 1/29/07, Paul Barbieux <[EMAIL PROTECTED]> wrote:

  Thank you everybody.
The examples are nice, but my problem remains: these sites use same size
for components like input fields, combobox, buttons and text.

So, I posted images at this address: www.flickr.com/photos/[EMAIL PROTECTED]/
Now, you can see what worries me!




--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.

Reply via email to