Button width

Hi all,
i set a button width property to 200px and i see layout preview correctly in SE80
but the framework seems to optimize automatically  button width on the rendering (button text is short) ...
is there a way to force button width?
thanks
Alessandro
Edited by: alessandro spadoni on Sep 28, 2010 12:02 PM
Edited by: alessandro spadoni on Sep 28, 2010 12:05 PM

Sorry,
it seems a bug using Firefox;
i see correct width in IE8
Alessandro

Similar Messages

  • Button Width Via CSS?

    Hi -
    I tried setting a button <mx:Button> width via CSS but
    the "width" tag does
    not effect the button.
    Rich

    "width" is not a style. It is a property, so you can't set it
    via CSS.
    Depending on where your Button is located and why you want to
    use a
    style, you could set the "left" and "right" constraints,
    which will
    indirectly set the width based on the size of the Button's
    container.
    -- Greg
    -- Adobe Flex Builder Team
    Richard Morey wrote:
    > Hi -
    >
    > I tried setting a button <mx:Button> width via CSS
    but the "width" tag does
    > not effect the button.
    >
    > Rich

  • Custom Button Widths

    When I replace auto menu buttons with custom PSD images, and want to remove Muse SHow Items, the menu defaults to Uniform Size. Even if I deselect Edit Together, button widths are uniform. Adjusting Scale to Fit or Scale to FIll has no effect.

    Have you tried changing to uniformed spacing?

  • Why is my button width 1?

    Ok I'm officially confused.
    Why is the width of my button 1 and height 28 (when it should be  237 x 51)? It seems to be interfering with multiple buttons I have in my other animations.
    Here's the button...
    http://twistedpancreas.com/edge/misc/btnRollover.zip
    Can I change it to the actual size that it should be, because when I try it scales the button way too long?
    Thanks in advance.

    The button is a Symbol and the size has been changed at some point.
    I just looked at your file, to correct it
    - double click the btnRollover symbol in the Symbols Panel
    - at the symbol Stage properties, turn off 'proportional' size by clicking the link icon;
    - then set the w to 237 and h to 51;
    - then exit Symbol Edit mode.
    Darrell

  • Why can't I change button width smaller than 70px in a spark tilegroup?

    I have an <s:TileGroup> in spark theme, and It contains several buttons.
    I'm unable to change the width of the buttons below 70px.
    I tried changing "minWidth", but that doesn't seem to do anything?
    Why is this and how can i change the width?

    Hi,
    I tried for the same and its working fine pass the same value for the width and minWidth.
    I have tried with 5 and 10. Its working fine.
    with Regards,
    Shardul Singh Bartwal

  • Where do I control default Auto behavior of Button.Width and .Height in Visual Basic 2013 designer?

    Why does a Button auto-size itself to completely fill a cell in a Grid if I write the code for it in the .xaml-file but fit to the Button.Content if I drag-and-drop the Button into the Grid from the Controls toolbox? Somehow, the software remembers where
    the Button came from, but I can't see where, and if I look in the Properties window I can see what dimensions it gets from the auto-sizing, but I can't see any options to change the behavior. Apparently I have to hardcode the dimensions of the Button to fix
    it, and that, obviously, is not desirable.
    Incidentally, it seems that if I cut-and-paste the code for a Button from one .xaml-file to another, it behaves as if the component was drag-and-dropped into place, i.e. even if the Button fills out the Grid cell in the source project it wil shrink to fit
    the Button.Content in the destination project.
    Why is this? And where is it that I haven't looked to make the Button behave?
    Thanks in advance

    Hi,
    This is the default behavior in VS. Seems there is no way can control it. May be you can create a custom button to solve your problem.
    Best Wishes!

  • Task bar button width

    Hi there,
    Does anyone know how (if possible) to increase the width of the tasks that appear in the Windows taskbar?
    As LabVIEW prepends the library name to all VIs I often have quite a few similar looking tasks in the taskbar (Windows truncates the text)
    This leads me to trying to keep the library name as short as possible, not really what I want to be doing.
    I have a nice wide monitor, and I make the task bar double height, it would be nice to be able to stretch (or set) a minimum width for tasks. Then I could see the whole VI name (or at least more of it), unlike the situation I am dealing with now, as shown in the screeny
    Also, I really wish they would change the icon to differentiate between block diagram and front panel! (I know I should have actually filled out a product suggestion years ago...)
    holding thumbs!
    nrp
    Message Edited by nrp on 06-05-2008 10:40 AM
    nrp
    CLA
    Attachments:
    tasks.png ‏4 KB

    I'll bet there is a legacy dll somewhere that can be fiddled with, but as an easier alternative which may be useful is an XP 'power toy' It replaces the alt-tab select with a screenshot and full name of the window instance, and you can move your mouse over each item - which is quicker than alt-tabbing through them all :-)
    power toys
    About half way down, it's called alt-tab replacement / Taskswitch.exe
    Message Edited by yenknip on 06-05-2008 11:42 AM
    - Cheers, Ed
    Attachments:
    alt tab.PNG ‏37 KB

  • Extend spark dropdownlist button to the longest item in dataprovider ?

    Hi,
    simple as stated in the thread's title : I cannot figure out a way to have my spark DropDownLists (no particular skin) extend their width to their longest item width ??
    For instance the following :
    <s:DropDownList id="aglist" width="100%" requireSelection="false"
                                    dataProvider="{model.userAssignedAgents}" labelFunction="agentLabel"
                                    change="aglist_changeHandler(event)" open="{aglist.selectedIndex = -1}"/>
    when layed on a simple spark panel gets the standard DDList button width, about 50px whatever its content, though its items are much longer than that. So when the button is clicked, the dropdown menu shows some ugly scrollbars.
    Do you have any clue ? I've been stuck for hours trying to do what sounds like the very-standard-way-of-setting-dropdownlist-width to me !
    Thanks
    Matt

    Good point.
    The main problem I had with the ComboBox is that I don't want to allow "creation" of new elements, so if the typed text doesn't match any element, instead of selectedIndex of -3 it should just keep the old selection. Plus a few other things.
    Thinking about it, this is probably my best choice, and if I were to extend a class it should probably be this one.

  • Anchor a button upper right in a panel?

    Have to anchor a button upper right in a panel.  Need it to stay anchored even when I use resize and move effects on the panel.  Want the button up top, not in the panel's content pane.
    The only way I know to get a button up there is to put it in the panel's titleBar.  If I want it to be anchored I'll have to put it in a container that supports constraints, like a Canvas, before putting it in the titleBar.  When I do this, constraints seem to go out the window.  They work somewhat but behave abnormally. 
    Here's a sample app (2 files) implementing this approach.  Compile and click the button down below.  The large panel with the button in its titleBar is supposed to shrink and hide behind the little video window.  It does, but the button in its titleBar doesn't go along for the ride.  It's not constrained.  Is there another approach to this?
    Main app file (constraints.mxml) followed by custom panel file (CustomPanel.mxml)...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:custom="*"
        layout="absolute"
        initialize="init()">
        <mx:Script>
            <![CDATA[       
                [Bindable]
                private var vidX:Number;
                [Bindable]
                private var vidY:Number;
                [Bindable]
                private var vidW:Number;
                [Bindable]
                private var vidH:Number;
                [Bindable]
                private var panelX:Number;
                [Bindable]
                private var panelY:Number;
                [Bindable]
                private var panelW:Number
                [Bindable]
                private var panelH:Number;
                private var open:Boolean = true;
                public function init():void
                    vidX = 20;
                    vidY = 20;
                    vidW = 180;
                    vidH = 120;
                    panelX = 202;
                    panelY = 20;
                    panelW = 500;
                    panelH = 350;               
                private function onButtonClick(e:MouseEvent):void
                    if(open)
                        inAndDownSize.play();
                        open = false;
                    else
                        outAndUpSize.play();
                        open = true;
            ]]>
        </mx:Script>
        <!--  Effects -->
        <mx:Parallel id="outAndUpSize"
            duration="200">
            <mx:Move
                target="{panel}"
                xFrom="{vidX}" xTo="{panelX}"/>
            <mx:Resize
                target="{panel}"
                widthTo="{panelW}" heightTo="{panelH}"/>   
        </mx:Parallel>
        <mx:Parallel id="inAndDownSize">
            <mx:Move
                target="{panel}"
                xFrom="{panelX}" xTo="{vidX}"/>
            <mx:Resize
                target="{panel}"
                widthTo="{vid.width}" heightTo="{vid.height}"/>
        </mx:Parallel>
        <!--UI elements -->
        <custom:CustomPanel id="panel"
            x="{panelX}" y="{panelY}"
            width="{panelW}" height="{panelH}"
            layout="absolute">
        </custom:CustomPanel>   
        <mx:VideoDisplay id="vid"
            x="{vidX}" y="{vidY}"
            width="{vidW}" height="{vidH}"/>
        <mx:Button
            label="Click"
            horizontalCenter="0"
            bottom="10"
            click="onButtonClick(event)"/>
    </mx:Application>
    CustomPanel.mxml...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="absolute"
        initialize="init()"
        creationComplete="onCreationComplete()">   
        <mx:Script>
            <![CDATA[
                import mx.containers.Canvas;
                import mx.controls.Button;       
                private var button:Button = new Button();
                private var canvas:Canvas = new Canvas();
                private var style:CSSStyleDeclaration = new CSSStyleDeclaration();   
                private function onCreationComplete():void
                    canvas.width = parent.width;
                    canvas.height = parent.height;               
                    style.setStyle("left", 400);
                    button.id = "button";
                    button.label = "b";
                    button.width = 30;
                    button.height = 30;               
                    button.styleDeclaration = style;
                    canvas.addChild(button);
                    this.titleBar.addChild(canvas);
            ]]>
        </mx:Script>   
    </mx:Panel>

    Hi,
    There is not need to use Canvas to position it. override the updateDisplayList method and move the button. Check the code below.
    <mx:Script>
            <![CDATA[
                import mx.controls.Button;
                private var button:Button;
                private var style:CSSStyleDeclaration = new CSSStyleDeclaration();  
                   override protected function createChildren():void
                       super.createChildren();
                       button = new Button();
                       button.label = "b";
                    button.styleDeclaration = style;
                    titleBar.addChild(button);
                override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
                    super.updateDisplayList(unscaledWidth,unscaledHeight);
                    button.width = 30;
                    button.height = 30;
                    //move button to the top right
                    button.move(width - button.width - 5, 5);
            ]]>
        </mx:Script>

  • How to obtain the button size created by JavaFX ?

    Here the codes:
    ToggleButton tb1 = new ToggleButton("Minor");
    System.out.println(tb1.getWidth());
    System.out.println(tb1.getPrefWidth());
    The output is :
    0.0
    -1.0
    But in Swing,
    JButton tb1 = new JButton("Minor");
    System.out.println(tb1.getPrefferedSize().width);
    The output is 109 which is I want to obtain.
    How can we get the size of the button created by "new Button() ..." as in Swing ? I strongly hope the answer is yes, because I find that function in Swing very useful.
    Thanks
    (Note: I discover that after the code "primaryStage.show()", we can get the correct button width by using button.getWidth(), but when we use button.getPrefWidth() we still get -1.0, the value undesired.)

    Thanks for your prompt. I have been read that discussion. But their responses are not very appropriate for me.
    Rectangle rect = new Rectangle(); 
    rect.widthProperty().bind(tb1.widthProperty().add(tb2.widthProperty())); 
    is what I want to obtain.
    And
    final Button button = new Button("Play"); 
    final Scene snapScene = new Scene(button); 
    snapScene.snapshot(null); 
    System.out.println(button.getWidth()); 
    is also a very good solution for me.

  • I want to know how to clear the text area by the push off my next question button and ask a new ques

    I want to know how to clear the text area by the push off my next question button and ask a new question - also I want to know how to code in my project to where a user can enter a math question in one border container and the answer enters into the next container
    heres my code so far
    <?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="955" minHeight="600" backgroundColor="#1E5C75">
        <fx:Script>
            <![CDATA[
                protected function button1_clickHandler(event:MouseEvent):void
                    //convert text area into labelid to be identified by actionscript
                    richTextLabel.text = myArea.text;
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <!--container 1-->
        <s:BorderContainer borderWeight="7" x="28" y="10" width="200" height="138">
            <s:layout>
                <s:VerticalLayout paddingTop="10" paddingBottom="10"
                                  paddingLeft="10" paddingRight="10"/>
            </s:layout>
            <!--data Entry control-->
            <s:TextArea id="myArea" width="153" height="68"/>
            <!--end of data entry control-->
            <s:Button width="151" label="ask a question" click="button1_clickHandler(event)"/>
        </s:BorderContainer>
        <!--container2-->
        <s:BorderContainer borderWeight="7" x="509" y="10" width="200" height="138">
            <s:layout>
                <s:VerticalLayout paddingTop="10" paddingBottom="10"
                                  paddingLeft="10" paddingRight="10"/>
            </s:layout>
    <!--data entry control-->
            <!--convert tne data entry control into a label id in actionscript-->
            <s:Label id="richTextLabel" width="153" height="68"/>
            <s:Button width="151" label="next question" click="button1_clickHandler(event)"/>
        </s:BorderContainer>
        </s:Application>

    This is a user to user support forum.  We are all iphone users just like you.
    You are not addressing Apple here at all.
    This is an odd way to ask your fellow iphone users for help. Berating oterh users will not help you.
    "it's too fragile"
    No it is not.  i have never damaged one, nor has anyone I know.
    " U loose data when Ur phone is locked"
    No you don't.  Why do you think this?
    "and there is no customer support!!!  "
    Wrong yet again.  Apple has an 800 number and they have many retail stores and they have support articles that you can access using the search bar. Or you can contact them throgh express lane online
    "but I will go back with Blackberry "
    Please do.
    Good ridance

  • How To Make Search Query Showing the Result As List of Buttons.

    Can some one give me an idea how to start to make a Search Query showing the results as list of buttons.. i have already have my buttons with names. i just dont know how to make a search query.
    this is my on screen keyboard i made..
    im making a system that the result were a list of buttons.. showing like this
    This was supposed to be the output of the query that i need to do..
    Please help me.. i just need a idea or tips how to make this one.

    Here is code I posted recently for another question
    Public Class Form1
    Const BUTTON_SIZE As Integer = 20
    Const SPACE As Integer = 5
    Sub New()
    ' This call is required by the Windows Form Designer.
    InitializeComponent()
    ' Add any initialization after the InitializeComponent() call.
    Dim buttons As New List(Of List(Of MyRadioButton))
    For row = 1 To 6
    Dim newRow As New List(Of MyRadioButton)
    buttons.Add(newRow)
    For col = 1 To 6
    Dim button As New MyRadioButton()
    button.row = row
    button.col = col
    button.Height = BUTTON_SIZE
    button.Width = BUTTON_SIZE
    button.Left = col * (BUTTON_SIZE + SPACE)
    button.Top = row * (BUTTON_SIZE + SPACE)
    button.Name = String.Format("radGr1{0}_{1}", row.ToString(), col.ToString())
    Me.Controls.Add(button)
    newRow.Add(button)
    AddHandler button.CheckedChanged, AddressOf Radio_Change
    Next col
    Next row
    End Sub
    Private Sub Radio_Change(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim button As MyRadioButton = CType(sender, MyRadioButton)
    Dim row As Integer = button.row
    Dim col As Integer = button.col
    End Sub
    End Class
    Public Class MyRadioButton
    Inherits RadioButton
    Public row As Integer
    Public col As Integer
    End Class
    jdweng

  • Button label positioning

    Hi,
    I am new to Flex 2 world but even my question seems a bit
    funny to me. I'm trying to create a square button (width=200 by
    height=200) and I want the label inside the button to be in one of
    the top corners. At this point I don't care if it's in the left or
    right top corner.
    I've tried everything and I was only able to get the label to
    be left aligned using the TextAlign property but I can't seem to
    figure out how to Vertically align it to the top.
    any help you be greatly appreciated.
    Incase someone needs to see the mxml code to understand what
    I'm doing, here it is: (LOL)
    <mx:Button label="topleft" width="200" height="200"
    textAlign="left"/>
    Also, I've tried to put a <mx:Label> right after this
    button and using the x/y co-ordinates, place it on TOP of the
    button and that works but then when I mouseover the label it looses
    the mouseover the button (which is obvious).
    HELP! :)

    The paddingTop worked. I just had to set it top a negative
    value :) I feel like I had to "cheat" to get this working :)
    Thanks a lot!

  • Best Practice Buttons? and Swing Button Sizes

    Hi,
    I am wondering what the best way to make a custom styled button was....
    Since I need my own style of button (width,height,background image, selected, clicked) I thought I would use Swing buttons with a Synth style. However, when I place swing buttons inside a CustomNode, all of the button widths, heights, x, y settings are discarded. I can understand the x/y being discarded as the component location should become relative and set by the wrapping CustomNode. I can also understand this because I can set the positions with translateX and translateY. However, I can't see how I can set a width and height of the swing button from inside the CustomNode.
    Can this be done?
    Alternatively, I don't mind using an alternative to the swing button however this is the only button I can see in JavaFX.
    Thanks for reading

    Ok, looks like I can wrap the button's inside a group, stage eta Node wrapper. Then I can preserve the button sizes and can produce relative/translatable positioning of the group/stage. This I understand and find to be a good feature. One thing that does concern me is that with the Swing button's - the Synth styles are not correctly applied. No matter what I do I can not get button text color to change. Changing the background mostly works but the text label styling is completely ignored.

  • Setting width/height too early??

    I noticed if I set width and/or height before adding it to
    displayList, the displayObject simply won't show up. The following
    code is a cut&paste from livedoc (SimpleButton), except that I
    add a line of "button.width=20".
    If, however, I move the line to after addChild(), things work
    normally.
    Why?:confused: :confused: :confused:
    [CODE]
    package {
    import flash.display.*;
    import flash.events.*;
    public class SimpleButtonDemo extends Sprite {
    public function SimpleButtonDemo( ) {
    // Create a simple button and configure its location
    var button:SimpleButton = new SimpleButton( );
    button.x = 20;
    button.y = 20;
    //// ################# Added by me. Button won't show up any
    more.
    button.width = 80;
    // Create the different states of the button, using the
    // helper method to create different colors circles
    button.upState = createCircle( 0x00FF00, 15 );
    button.overState = createCircle( 0xFFFFFF, 16 );
    button.downState = createCircle( 0xCCCCCC, 15 );
    button.hitTestState = button.upState;
    // Add an event listener for the click event to be notified
    // when the user clicks the mouse on the button
    button.addEventListener( MouseEvent.CLICK, handleClick );
    // Finally, add the button to the display list
    addChild( button );
    //// ############### This works, if added here!!!!
    // button.width = 20;
    // Helper function to create a circle shape with a given
    color
    // and radius
    private function createCircle( color:uint, radius:Number
    ):Shape {
    var circle:Shape = new Shape( );
    circle.graphics.lineStyle( 1, 0x000000 );
    circle.graphics.beginFill( color );
    circle.graphics.drawCircle( 0, 0, radius );
    circle.graphics.endFill( );
    return circle;
    // Event handler invoked whenever the user presses the
    button
    private function handleClick( event:MouseEvent ):void {
    trace( "Mouse clicked on the button" );
    }[/CODE]

    You're using the simple button class. Just because you
    instantiate an object of this class doesn't mean you've added
    anything to the button.
    What I'm trying to tell you is that addChild has nothing to
    do with it. Simple Button just happens to be dependent on what is
    defined inside the button states themselves.
    For instance, comment out your hitStates leaving your width
    call after the addChild and you should notice the same behavior as
    before. By defining the button states, you are actually adding
    content to the container that will be drawn to the display when
    addChild is called.
    You can define your height and width anytime after you have
    defined the states for the button. At this point, Flash will then
    have content to manipulate. Until you have drawable content to push
    to the display list, nothing will happen when width and height are
    called.

Maybe you are looking for

  • Different LOVs in af:query and af:form for the same VO attribute

    Hi, We need to display different LOVs in af:query and af:form for the same attribute in VO. Is it possible to use LOV Switcher for this ? What condition can we use in LOV Switcher attribute to check if it is View Critearia row or VO row ?

  • Changing Look & Feel of xMII HomePage

    Hi all,     Can anyone plz tell me which files to be checked if we need to change the look and feel of header or footer or the whole xMII Portal HomePage. Thanks in advance Regards Muzammil P.T

  • Fingerprint driver fails to load with a new X240 and Windows 7 64bit

    "Validity sensor (WBF) (PID=0017)" appears with a yellow exclamation mark. system doesn't recognize the sensor, after driver is installed. enabled in Bios. newest bios updated. newest drivres used from lenovo support website. reinstalled and installe

  • Youtube will not play

    On my iphone 4, 16gb, ios 5.0.1, youtube videos will not play, at all. I tap the video, it acts like it is loading and then immediately returns to the video description.  I have done a hard reset, wiped history and data and cookies from safari...any

  • Query on Notification

    navigation: Resp : System administrator. Menu : Workflow : Administrator Workflow Function : Notifications Then Select "Notification From Me" in View Pop List. Got Some Notifications : Why there is only one page every product notification '/oracle/ap