Setting width of objectchoicefield

Hello

I want to ObjectChoiceField without tag and set its width on screen width in my project. Suggest me the way to do this

Thanks in advance

Check this box to learn how to make a custom presentation:
http://supportforums.BlackBerry.com/T5/Java-development/how-to-extend-Manager/Ta-p/446749

in your case, you can also try to crush getPreferredWidth, but do not know if it works on a choicefield

Tags: BlackBerry Developers

Similar Questions

  • How to set a width of ObjectChoiceField?

    Hello

    can someone tell me how I can set a width of objectchoicefield.

    Suppose that there are two values in objectchoicefield.

    'abc '.

    "abcdefg".

    now I want the width should be equal to the string max.

    When I select abc the objectchoicefield become smaller compared to the "abcdefg".

    now I want the width should be equal to the string max.

    Hello

    I think you should write an overring of the custom ObjectChoiceField class by provision of overring, paint, drawfocus etc needs to satisfy you.

    OK, here's one of my custom ObjectChoiceField class. Copy pasted from one of my old code.

    I think that playing around with the code you will should be able to do like yours.

    import net.rim.device.api.ui.component.ObjectChoiceField;
    import net.rim.device.api.ui.Graphics;
    import java.lang.String;
    import net.rim.device.api.ui.XYRect;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.system.Bitmap;
    
    public class CustomChoiceField extends ObjectChoiceField
    {    
    
        /** Constants for the horizontal text alignment */
        public static final int TEXT_HALINGMENT_LEFT = 0;
        public static final int TEXT_HALINGMENT_CENTER = 1;        
    
        /** Array of choices */
        String[] m_Choices;    
    
        /** Left margin of the field */
        private int m_MarginLeft = 1;    
    
        /** Right margin of the field */
        private int m_MarginRight = 1;    
    
        /** Top margin of the field */
        private int m_PaddingTop = 5;    
    
        /** Top margin of the field */
        private int m_PaddingBottom = 5;        
    
           /** Top margin of the field */
        private int m_MarginTop = 5;    
    
        /** Top margin of the field */
        private int m_MarginBottom = 5;       
    
        /** Right margin of the text in the selectbox */
        private int m_TextMarginRight = 5;    
    
        /** Left margin of the text in the selectbox */
        private int m_TextMarginLeft = 5;    
    
        /** Horizonta text alingment */
        private int m_HTextAlignment = TEXT_HALINGMENT_CENTER;    
    
        /** Width of the chpice box */
        private int m_ChoiceFieldWidth;    
    
        /** Height of the field */
        private int m_Height;    
    
        /** Determones is field focused */
        private boolean m_isFocused = false;    
    
        /** Width of thr DropDown arrow */
        private int m_DropDownArrowWidth;        
    
        /** Field default color */
        private int m_DefBgColor = 0xffffff;    
    
        /** Field text default color */
        private int m_DefTextColor = 0;    
    
        /** Field color when it is focused */
        private int m_FocusedBgColor = 0xf6921e;    
    
        /** Field text color when it is focused */
        private int m_FocusedTextColor = 0;        
    
        /**     * Constructor. The width of choice box became as big as
        * maximum length of choice strings + text marfins + derop-down arrow width.
        * *      * @param String - label of the field
        * * @param String[] - field choices
        * */
        public CustomChoiceField(String label, String[] choices)
        {
            super(label, choices);
            m_Choices = choices;        
    
            //dimensions of selectable field
            Font currFont = getFont();
            m_DropDownArrowWidth = m_Height = currFont.getHeight();
            m_ChoiceFieldWidth = currFont.getAdvance(choices[0]);
            for(int i = 1; i < choices.length; i++)
            {
                if(m_ChoiceFieldWidth < currFont.getAdvance(choices[i]))
                    m_ChoiceFieldWidth = currFont.getAdvance(choices[i]);
            }
            m_ChoiceFieldWidth += m_TextMarginLeft + m_TextMarginRight + m_DropDownArrowWidth;
        }        
    
        /**     * Constructor. The width of choice box became as big as
        * maximum length of choice strings + text marfins + derop-down arrow width.
        * *
        * * @param String - label of the field
        * * @param String[] - field choices
        * * @param int - initial choice index
        * */
        public CustomChoiceField(String label, String[] choices, int initialIndex)
        {
            super(label, choices, initialIndex);
            m_Choices = choices;        
    
            //dimensions of selectable field
            Font currFont = getFont();
            m_DropDownArrowWidth = m_Height = currFont.getHeight();
            m_ChoiceFieldWidth = currFont.getAdvance(choices[0]);
            for(int i = 1; i < choices.length; i++)
            {
                if(m_ChoiceFieldWidth < currFont.getAdvance(choices[i]))
                    m_ChoiceFieldWidth = currFont.getAdvance(choices[i]);
            }
            m_ChoiceFieldWidth += m_TextMarginLeft + m_TextMarginRight + m_DropDownArrowWidth;
        }        
    
        /**
        * Constructor. The width of choice box became as big as
        * * maximum length of choice strings + text marfins + derop-down arrow width.
        * *
        * * @param String - label of the field
        * * @param String[] - field choices
        * * @param int - initial choice index
        * * @param long - field style(see ObjectChoiceField styles)
        * */
        public CustomChoiceField(String label, String[] choices,  int initialIndex, long style)
        {
            super(label, choices, initialIndex, style);
            m_Choices = choices;
            //dimensions of selectable field
            Font currFont = getFont();
            m_DropDownArrowWidth = m_Height = currFont.getHeight();
            m_ChoiceFieldWidth = currFont.getAdvance(choices[0]);
            for(int i = 1; i < choices.length; i++)
            {
                if(m_ChoiceFieldWidth < currFont.getAdvance(choices[i]))
                    m_ChoiceFieldWidth = currFont.getAdvance(choices[i]);
            }
            m_ChoiceFieldWidth += m_TextMarginLeft + m_TextMarginRight + m_DropDownArrowWidth;
        }        
    
        /**
        * Set field choices
        * *
        * * @param String[] - array of field choices
        * */
        public void setChoices(Object[] choices)
        {
            super.setChoices(choices);
            m_Choices = (String[])choices;
        }        
    
        /**
        * Set field margins. This method takes an effect for
        * * parameter to be >= 0.
        * *
        * * @param int - left margin of the field
        * * @param int - right margin of the field
        * * @param int - top margin of the field
        * * @param int - bottom margin of the field
        * */    
    
        public void setMargins(int marginLeft, int marginRight, int marginTop, int marginBottom)
        {
            if(marginLeft >= 0)
                this.m_MarginLeft   = marginLeft;
            if(marginRight >= 0)
                this.m_MarginRight  = marginRight;
            if(marginTop >= 0)
                this.m_MarginTop    = marginTop;
            if(marginBottom >= 0)
                this.m_MarginBottom = marginBottom;
        }        
    
        /**
        * Set horizontal text alignment in the text box.
        * *
        * * @param int - alignment of the text
        * */
        public void setTextHAlignment(int alignment)
        {
            m_HTextAlignment = alignment;
        }        
    
        /**
        * Set choice box width.
        * *
        * * @param int - choice box width.
        * */
        public void setChoiceWidth(int width)
        {
            m_ChoiceFieldWidth = width;
        }        
    
        /**
        * Set text font.
        * *
        * * @param int - font style (see Font class)
        * * @param int - font height
        * * @param boolean - if true control height updates according to the new font height.
        * */
        public void setTextFont(int style, int height, boolean updateHeight)
        {
            this.setFont(getFont().derive(style, height));
            if(updateHeight)
                m_DropDownArrowWidth = m_Height = getFont().getHeight();
        }        
    
        /**
        * Method retrieves this field's preferred width.
        * *
        * * @return int - field's preferred width
        * */
        public int getPreferredWidth()
        {
            return m_MarginLeft + m_MarginRight + m_ChoiceFieldWidth + getFont().getAdvance(getLabel());
        }        
    
        /**
        * Method retrieves this field's preferred height.
        * *
        * * @return int - field's preferred height
        * */
        public int getPreferredHeight()
        {
            return m_MarginTop + m_PaddingTop + m_PaddingBottom + m_MarginBottom + m_Height;
        }        
    
        /**
        * Determines if this field accepts the focus.
        * *
        * * @return boolean - always true.
        * */
        public boolean isFocusable()
        {
            return true;
        }        
    
        /**
        * Retrieves this field's current focus region.
        * *
        * * @param XYRect - object to contain the focus rect for this field in local coordinates
        * */
        public void getFocusRect(XYRect rect)
        {
            rect.set(m_MarginLeft + getFont().getAdvance(getLabel()), m_MarginTop , m_ChoiceFieldWidth, m_Height + m_PaddingBottom + m_PaddingTop);
        }        
    
        /**
        * Draws the focus indicator for this field
        * *
        * * @param Graphics - graphics context for drawing the focus
        * * @param boolean - true if the focus should be set; otherwise, false.
        * */
        protected void drawFocus(Graphics graphics, boolean on)
        {
            invalidate();
        }        
    
        /**
        * Lays out field contents.
        * *
        * * @param int - amount of available horizontal space.
        * * @param int - amount of available vertical space.
        * */
        protected void layout(int width, int height)
        {
            setExtent(Math.min(getPreferredWidth(), width), Math.min(getPreferredHeight(), height));
        }        
    
        /**
        * Invoked when a field receives the focus.
        * *
        * * @param int - Indicates from which direction the focus enters the field.
        * */
        public void onFocus(int direction)
        {
            m_isFocused = true;
            invalidate();
        }        
    
        /**
        * Invoked when a field loses the focus.
        * */
        public void onUnfocus()
        {
            m_isFocused = false;
            invalidate();
        }        
    
        /**
        * Method draws a edit field.
        * *
        * * @param Graphics - graphic context.
        * */
        public void paint(Graphics g)
        {
            Bitmap image = Bitmap.getBitmapResource("dropdown.png");
    
            String visibleText = (getSelectedIndex() == -1 || getSelectedIndex() >= m_Choices.length)?"":m_Choices[getSelectedIndex()];
            int textLength = getFont().getAdvance(visibleText);
            int labelLength = getFont().getAdvance(getLabel());
            int textY = m_MarginTop + m_PaddingTop + (m_Height - getFont().getHeight())/2;
            if(textY < 0)
                textY = m_MarginTop;                
    
            //Text can be as big as text box field
            while(textLength > m_ChoiceFieldWidth - m_TextMarginLeft - m_TextMarginRight - m_DropDownArrowWidth && visibleText.length() > 0)
            {
                visibleText = visibleText.substring(0, visibleText.length()-1);
                textLength = getFont().getAdvance(visibleText);
            }
            int textX = (m_HTextAlignment == TEXT_HALINGMENT_CENTER)?              m_MarginLeft + labelLength + m_TextMarginLeft + (m_ChoiceFieldWidth - m_TextMarginLeft - m_TextMarginRight - m_DropDownArrowWidth - textLength)/2:
            m_MarginLeft + labelLength + m_TextMarginLeft;
            if(textX < 0)            textX = m_MarginLeft + labelLength + m_TextMarginLeft;                
    
            g.setColor(0);
            g.drawText(getLabel(), m_MarginLeft, textY);
            if(m_isFocused == false)
            {
                image = Utils.resizeBitmap(image, m_ChoiceFieldWidth, m_Height + m_PaddingBottom + m_PaddingTop);
                /*
                //Draw edit box bg
                g.setColor(m_DefBgColor);
                g.fillRect(m_MarginLeft + labelLength, m_MarginTop, m_ChoiceFieldWidth, m_Height);            
    
                //Draw edit box rect
                g.setColor(0);
                g.drawRect(m_MarginLeft + labelLength, m_MarginTop, m_ChoiceFieldWidth, m_Height);
                //Draw edit box text
                */
                g.drawBitmap(m_MarginLeft + labelLength, m_MarginTop,  m_ChoiceFieldWidth, m_Height + m_PaddingBottom + m_PaddingTop, image, 0, 0);
    
                g.setColor(m_DefTextColor);
                g.drawText(visibleText, textX, textY);            
    
                //g.drawText(Integer.toString(cursorPosition), m_MarginLeft + labelLength + m_TextMarginLeft, textY);
            }
            else
            {
                //Draw edit box bg
                //g.setColor(m_FocusedBgColor);
                /*m_FocusedBgColor = ApplicationTheme.DEFAULT_TEXT_BOX_BACKGROUND_COLOR_ON_FOCUS;
                g.setColor(m_FocusedBgColor);
                g.fillRect(m_MarginLeft + labelLength, m_MarginTop, m_ChoiceFieldWidth, m_Height);            
    
                //Draw edit box rect
                g.setColor(0);
                g.drawRect(m_MarginLeft + labelLength, m_MarginTop, m_ChoiceFieldWidth, m_Height);          
    
                //Draw edit box bg
                g.setColor(m_DefBgColor);
                g.fillRect(m_MarginLeft + labelLength, m_MarginTop, m_ChoiceFieldWidth, m_Height);
                */
    
                image = Utils.resizeBitmap(image, m_ChoiceFieldWidth, m_Height  + m_PaddingBottom + m_PaddingTop);
                g.drawBitmap(m_MarginLeft + labelLength, m_MarginTop,  m_ChoiceFieldWidth, m_Height + m_PaddingBottom + m_PaddingTop, image, 0, 0);  
    
                //Draw edit box rect
                g.setColor(0);
                g.drawRect(m_MarginLeft + labelLength, m_MarginTop, m_ChoiceFieldWidth, m_Height + m_PaddingBottom + m_PaddingTop);
                //Draw edit box text 
    
                //Draw edit box text
                g.setColor(m_FocusedTextColor);
                g.drawText(visibleText, textX, textY);
            }
        }
       }
    

    Let me know if you still have problems.

    Concerning

    Bika

  • Setting width got

    Hello, when I put #unified - back - front - key to display: none, my url bar throws himself on the left side of the browser. Any reason, what is the cause? I tried to set the width of several selectors such as #nav - bar and container-urlbar #, nothing solves this problem. No reason?

    Try something like this:

    #urlbar-container { max-width:400px!important; padding-left:0px!important; margin-left:XXpx!important; }

    You can drag the B/F buttons unified to another position (that is, to the right of the search bar) before hiding the buttons with the code in userChrome.css

  • setting width of yes/no point type in jquerymobile

    Hi all

    I use version apex 4.2 on windows 7 64-bit oracle 11g R2.

    I created a mobile application, I created an article which appear as Yes/No.

    the yes value is INSTALLATION and not worth TROUBLESHOOTING

    Now when I run the application, the size of the Yes/No field is very low and none of the entire string is visible to the end user, that is, the STALLATI and the ROUBLS are displayed.

    Instead, I want to put the width correctly so that the values are displayed correctly, i.e. INSTALLATION or if the user tries to select the resolution of the PROBLEMS.

    I tried to set the width attributes of form elements in HTML with style = "width = 100px;" but nothing happens.

    Kindly guide me accordingly.


    Thank you.

    Hi Maahjoor,

    Maahjoor wrote:

    Any clue with the Please this problem?

    Thank you.

    You have to find the CSS classes which is to control the width of your yes / no items using debug tool like firebug (Mozilla firefox) etc.

    I tested the Mobile - 51 in Apex 5 theme and it works for me

    Select Page->-> Inline Css - > put the code below

    .ui-field-contain div.ui-slider-switch, .ui-field-contain.ui-hide-label div.ui-slider-switch, html .ui-popup .ui-field-contain div.ui-slider-switch {
        width: 10.8em !important;
    }
    

    Hope this helps you.

    Kind regards

    Jitendra

  • Setting width of objects while turning

    Hi everyone, just this problem is going to be really hard to explain without being able to show you exactly what I mean, but I'll do my best and if I confuse you so please tell me!

    I am working to set up a game at the present time that is similar in many ways to the mini-golf (or mini-golf, depending on where you come from). It shows a side view and play the user must select the ball by pressing the mouse, and then drag the mouse to indicate the direction that they want to shoot the ball in. The distance that they drag the mouse (it has a limit of course) determines the power of their shot.

    I currently use a triangular object with the point placed in the center of the ball to show the user the direction they have chosen. This triangle turns to deal with the position of the mouse, and I am trying to lengthen/shorten the distance between the mouse and the balloon-based. I have the code in place (below) that works when the mouse is either left or right side of the ball, but has rather strangely when the mouse is above or below the ball. When the mouse is in one of the last locations, the triangle extends to be much greater than the maximum length allowed by the program, but a trace shows that it is still within acceptable limits! You can see what the problem is here? I almost start thinking that Flash is switching the attributes 'width' and 'length' autour when the object rotates of 90 or - 90 degrees!

    The code I use is:

    If (ballSelected)

    {


    trajectory.rotationZ = Math.atan2 ((mouseY-ball.y), (mouseX-ball.x))*180/Math.PI - 0.3;)
    var tipPos:Point = new Point (trajectory.x, trajectory.y); The position of the tip of the triangle
    var mousePos:Point = new Point (mouseX, mouseY); The position of the mouse
    Trajectory.Width = methods Point.distance (mousePos, tipPos); Need sorting
    trace ("affecting width:" + trajectory.width);
    If the maximum size of //Limit (trajectory.width > 200)
    {


    Trajectory.Width = 200;


    }

    }

    Here are a few screenshots of the game as it is also - please do not laugh at the art of the horrible placeholder currently: none of this is final haha (note also that I did not implement 'gravity' yet, so everything is sort of glide through the air.) The first image shows the code works as I want what it with the triangle to its maximum width, the second shows the triangle's "enormous."

    GameWorking.png

    GameNotWorking.png

    Yes, it seems that there is something wonky with the width property. However setting the scaleX property seems to work for me. I'm not sure why you are simply by changing a single dimension of a movieclip to represent a "trajectory", but it seems to work for me:

    var path: MovieClip;
    var ball: MovieClip;

    Trajectory.x = ball.x;
    Ball.y = trajectory.y;

    stage.addEventListener (Event.ENTER_FRAME, rotate);

    function rotate(e:Event) {}
    Trajectory.rotation = Math.atan2 (mouseY - ball.y, mouseX - ball.x) * 180 / Math.PI;
    var dx:Number = mouseX - trajectory.x;
    var dy:Number = mouseY - trajectory.y;
    var dist:Number = Math.sqrt (dx * dx + dy * dy) / 200
    Dist trajectory.scaleX =<2 dist="" :="">
    }

    You can use the Point class to determine the distance, but I think it could be faster.

    I'd probably actually use the drawing api to draw the triangle that I wanted, but since I don't know exactly what you are trying to accomplish...

  • Setting width on columns with column graph tool

    Hello

    I'm perfecting my card a bit.

    Currently, the width of my columns using the column graph tool seem to be dictated by the number of columns, I had altogether. So if I did two columns both gets really large. But if I have four of them, they look very nice. Is it possible to set a fixed width on the columns with column graph tool?

    Thank you!

    What I think.

    Select your chart, double-click the graphic tool at the bottom of the dialog box, enter the percentage you want the coulmns be and the percentage desired this cluster to occupy.

    Duh!

  • setting width of percentage in actionscript

    Hi all

    I try to have a foldable component on a flex application, I train! I tried to use the < mx:Resize > tag as follows

    < mx:Resize id = 'contract' target = LargeurPour '{leftPanel}"="0"/ >
    < mx:Resize id = "expand" target = LargeurPour '{leftPanel}"="200"/ >

    with leftPanel was a component in my app!
    The above works, a sort of-, I must set my right panel to 100% so that when I reduce the left panel of the right panel takes over the screen! It is a bit of a messy hack, and the problem is that since I put the widths on my applications in the form of percentages (it is necessary to make the app is scalable) when I develop the leftPanel again, it's a different size! I don't want to set a static option for value as I want it to be scalable!
    I was wondering if anyone knew if I'd be able to set percentages for the LargeurPour option above? I couldn't find anything either on this topic so I assume I can't!
    I also tried to write a simple like function

    public function minimiseScreen (): void {}
    leftPanel.width = 0;
    rightPanel.width = 100;
    }

    public function maximiseScreen (): void {}
    leftPanel.width = 30;
    rightPanel.width = 70;
    }

    Again, I have a similar problem here that I don't know how (or if I can?) set values of percentage for widths above? Anyone know if this is possible? And if yes how?
    Or if it is not possible does anyone know any other way of manufacturing components foldable?

    Any help would be really appreciated!
    Thanks in advance,
    Derm

    Thanks guys 1 million.

    It worked perfectly!

    Sorry, I meant watch ye answered the question!
    Thanks again

  • set width to 100% photo

    Hello

    I tried to find the answer online but failed.

    I have a page with a slide show widget. There are two images

    and 100%. I want to fix the images a bit.

    I go to photoshop and reduction by half of the image... But there must be a kind of muse

    Drag the image to another post in the frame? Crop hand tool does not work...

    So suggestions of advice are welcome!

    Thank you

    Amber

    Hello

    This is a default behavior of Muse, where you have 100% width selected for hero image crop tool to reposition and double-click on & made drag to resize will not work.

    Kind regards

    Vivek

  • Setting width of the table text frame script

    Hello


    I need to capture my table cells within the "Width of the text frame" option with "Distribute column evenly", when it goes beyond the "width of the text frame. Is it possible by script?


    by

    hasvi

    Hi Hasvi,

    Try this.

    var doc = app.activeDocument,
        _tables = doc.stories.everyItem().tables.everyItem().getElements(),
        _tfwidth, _cells, finalwidthofcell;
    
    for(var i =0;i<_tables.length;i++)
    {
            var currentwidth = 0;
            _tfwidth = _tables[i].parent.geometricBounds[3] - _tables[i].parent.geometricBounds[1];
            _cells = _tables[i].rows[0].cells;
            for(var j=0;j<_cells.length;j++)
            {
                    currentwidth +=_cells[j].width;
                }
            if(currentwidth > _tfwidth)
            {
                    finalwidthofcell = _tfwidth/_cells.length;
                    for(var k=0;k<_cells.length;k++)
                    {
                            _cells[k].width =finalwidthofcell;
                        }
                }
        }
    

    Kind regards

    Cognet

  • SmartView VBA - can't set "Width of the column updated"

    Hi people,

    I am updating a series of workbooks based on the API VBA Essbase v9 on SmartView 11.1.2.1 and touched a problem - I am new to VBA SV commands, and I hope that it is something obvious that I'm missing.

    One of the functions which is essential to ensure recovery of data does not affect the layout of spreadsheets is the parameter 'Adjust the column widths', which, in the VBA Essbase API, could be managed by using the EssVSetSheetOption function, but neither HypSetGlobalOption nor HypSetSheetOption appear to have such a capability. The only option I have is to run get followed by some reformatting of the column widths, which seems rather ineligant for me.

    Any ideas?

    Thank you very much

    Dave

    research in the .bas file (and what needs to be included in your project that I find HSV_ADJUSTCOLUMNWIDTH in the definitions of the index count options to use for HypGetOption/HypSetOption

    Note, I'm looking at the 11.1.2.2 version, your mileage may vary depending on your version

  • How can I set width or height of an object?

    Hi guys,.

    y at - it a simple method to define a width/height of an object in absolute terms without messing with .geometricBounds?

    Something like this:

    app.activeDocument.selection [0] .width = "150 mm;

    or

    app.activeDocument.selection [0] .width ("150 mm", ConstrainProportion.Yes, AnchorPoint.bottomLeftAnchor);

    The object is in my case, usually a vector image copied from Illustrator.

    PanDulka

    > Don't have you by any chance version of CS3?

    In this case to use the PageItem.transform () method in an same special way.

    Try this:

    function setWidthHeightCS3(/*PageItem*/o, /*str*/w, /*str*/h, /*bool=false*/useVisibleBounds)
    {
        if( !o.transform) return;
    
        var CS_INNER = CoordinateSpaces.INNER_COORDINATES,
            BB = BoundingBoxLimits[(useVisibleBounds?'OUTER_STROKE':'GEOMETRIC_PATH') + '_BOUNDS'];
    
        var wPt = UnitValue(w).as('pt'),
            hPt = UnitValue(h).as('pt');
    
        if( 0 >= wPt || 0 >= hPt ) return;
    
        var wsBkp = app.transformPreferences.whenScaling,
            a = o.resolve([[1,1], BB], CS_INNER)[0].
                concat(o.resolve([[0,0], BB], CS_INNER)[0]),
            sx = wPt / (a[2]-a[0]),
            sy = hPt / (a[3]-a[1]);
    
        app.transformPreferences.whenScaling = WhenScalingOptions.APPLY_TO_CONTENT;
    
        o.transform(
            CS_INNER,
            AnchorPoint.CENTER_ANCHOR,
            [sx,0,0,sy,0,0],
            MatrixContent.SCALE_VALUES
            );
    
        app.transformPreferences.whenScaling = wsBkp;
    }
    
    // Sample code
    // ---
    setWidthHeightCS3(app.selection[0], "5cm", "100pt");
    

    @+

    Marc

  • How to set width on the charts?

    Hi guys.

    spend more than one pixel and redraw the line

  • createTextField setting width based on the length of the string

    I wonder if there is a way to easily calculate how wide to make a textfield you create dynamically with createTextField based on the length of a string that is passed as an argument. In other words, if you know you are going to use the font size, is there a way to know how many pixels you need? Thanks in advance to anyone who can offer assistance.

    have you looked into "TextField.autoSize?

    SPGAnne wrote:
    > I wonder if there is a way to easily calculate how wide to make a textfield
    > you create dynamically with createTextField based on the length of a
    > string passed as an argument. In other words, if you know the police
    > size you plan to use, is there a way to know how many pixels you need?
    > Thanks in advance to anyone who can offer assistance.
    >

  • Set the width of the mobile display according to device-width

    Hello

    How can I set width of viewport meta depending on the value of width mobile device?

    That is to say:

    If device-width < = width 960px then viewport = 960px

    If device-width > width 960px then viewport = device-width

    Hello

    You must set using pixels css not size in pixels for the width of the screen (physical width)

    Another suggestion would be to use % of the value for the width if you set width = device for window width value.

    You should try it on your end.

    Useful links:

    https://developer.Mozilla.org/en/docs/Mozilla/mobile/Viewport_meta_tag

    https://developers.Google.com/speed/docs/insights/ConfigureViewport

    -Opera-Mobile-9-7-10-works http://StackOverflow.com/questions/1974703/Meta-Viewport-Device-Width-Wrong-Width-Small-on

    Thank you

    Sanjit

  • The WIFI channel width

    Hello

    I use an iPhone 6. To improve data transmission, I set my router / Repeater for a wifi channel width of 40 MHz to 2.4 GHz. PC and portable that can use this channel without setting width. My iPhone doesn't work. Are there opportunities to set the iPhone to the 40 MHz channel width. So far I have not found any setting.

    Thanks in advance.

    ervau

    iOS is 9.3.2

Maybe you are looking for