Form Resize Affect Column width?

Hi Folks,
I have a very strange problem. I try to add a new matrix to Production Order form. The matrix will have 2 columns which are:
1. No - Non Editable (for numbering)
2. Description (information).
My code is like the following:
        oItem = oForm.Items.Add("mxRoute", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
        oItem.Left = 12
        oItem.Width = 532
        oItem.Top = 136
        oItem.Height = 183
        oItem.FromPane = 3
        oItem.ToPane = 3
        oMatrix = oItem.Specific
        oColumns = oMatrix.Columns
        '// Adding Culomn items to the matrix
        oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oColumn.TitleObject.Caption = "#"
        oColumn.Width = 20
        oColumn.Editable = False
        oColumn = oColumns.Add("Col1", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oColumn.TitleObject.Caption = "Operations"
        oColumn.Width = 500
        oColumn.Editable = True
The problem occured when i try to maximize my form. The first Col (#) will resize to a very big size!!! When i try to resize it to smaller form, it still very big column. Anybody has clue what should i do to the form since it is not possible to restrict the form type to Fixed???
Your help will be very appreciated..
Rgds,
Harianto Ng

Hi Harianto Ng,
Catch the after resize event and resize both columns by hand.
1. calculate width of columns 1 + 2
2 resize the first to 20
3 resize the second to totalwidth-20
Regards
Ad

Similar Messages

  • 1. Resizing of column width. 2. Drag and drop of columns for resequencing

    QUERY : Has anyone some experience in implementation/development of following functionality in a JSP/Tomcat server based application:
    1. Resizing of column width for a result which has multiple columns. .2. Drag and drop of these columns or any other mechanism for re-sequencing the columns?
    I would like to know will JSF would be helpful in it.

    Amit,
    The column resizing and 'drag and drop ' are client side issues. They requires DHTML and Javascript.
    AJAX is what is required. (wiki AJAX for more info)
    I am working on an AJAX grid and combobox component for JSF that will do this and many more functions.
    Let me know if you want more information.
    [email protected]

  • Is it possible to resize page column widths at runtime (by the user)?

    hi all,
    i have cretaed a page using the 2-columns narrow/wide layout.  this layout is perfect for what i want to do.
    however, the users have complained that they would like to be able to resize the columns, just like they are able to do with the Detailed Navigation column (using the small "<" and ">" arrows).
    is it posssible to add this functionality to my custom pages so that can also resize the columns?
    i searched for options in the properties, but didn't find anything.
    thanks,
    mm

    This was a great place for me to start
    Thank you
    I took profdant139's suggestions a bit further as my real goal was to have the "Document column" narrower. The goal to be able to see all the other document info that was usually hidden way out to the right
    To achieve my results I right clicked in the upper bar with the column names and chose from the drop down box "comments" column (as suggested). I then dragged it to the far right. This pushed all the other columns over.
    In the end of the day I ended up adding "Size" and "Date modified" columns as well to get my desired results.
    Remember one can move different columns around to be in the order you need by clicking on the column to get it active and then left click and drag it to where you want
    Another great thing is that by default (Using Mavericks) the date modified, opened,created columns have date and time. One can shrink them down to xx/xx/xx format by manually adjusting the column width like one does in Excel - click on column separator up top and drag
    Once all that is done, at least on my box, I closed it out and opened up a new finder window and everything was as I wanted.
    Thank you for the help  from the above helper to get me here

  • JTable resizing the column width

    Have a JTable whose column width's are set using
    int width = ((String)getDataTbl().getColumnModel().getColumn(0).getHeaderValue()).length() + 32;
    getDataTbl().getColumnModel().getColumn(0).setPreferredWidth(width);
    int width1 = ((String)getDataTbl().getColumnModel().getColumn(1).getHeaderValue()).length()+207
    getDataTbl().getColumnModel().getColumn(1).setPreferredWidth(width1);
    Now depending on the data in column 1 the column width has to be increased if more than width1 and the scroll bar should apprear only in this case only?
    How to do this?
    Thanks.

    maybe you can implement a interface ComponentListener as well as ComponentAdapter with your topmost Table.
    for example:
    toptable.addComponentListener(
    new ComponentAdapter(){
    public void componentResized(ComponentEvent e){
    table1.setSize(....);
    table2.setSize(....);
    /*Optionally, you must also call function revalidate
    anywhere;*/
    );

  • Help with Resizing of column widths in a pivot

    HI all,
    I m working on resizing the pivot coulmn width in a dashboard. Could anyone please help with resizing the pivot width. Autosize() works but user doesnt want that.
    Whats the code to do that?

    I read what was written but still am confused. I am completely lost at this pointWhat is confusing you? A TreeMap is just a HashMap where the key is stored is sorted order.
    Read the Collections tutorial found [url http://java.sun.com/docs/books/tutorial/]here.

  • Resize jtable column width

    I am trying implement a utility in JTable by which when a person clicks on the column header, the whole column should resize according to the cell which has lengthiest data. If you have seen this in MS Excel where by clicking on the column this happens. I want the same thing.
    Is there anyway already defined in javax.swing?
    I have added a Mouselistener on Tableheader and when the person clicks on a column header, I first finds out the column index. Now on that column index scan the whole column for the lengthiest data. After finding the lengthiest data I set the preferred width for that column and call doLayout on the table object. In this case the problem is of font as the font is not fixed width. The multiplication factor which returns the pixel doesn't gives the right pixel width. Is there any way by which I can find pixel width of a String?

    Use the following code to compute the width of a
    column in pixels required to display the maximum sized
    string in the table column:
    FontMetrics fm =
    table.getFontMetrics(table.getFont());
    int width =
    SwingUtilities.computeStringWidth(fm,maxSizeString)
    //then to set the width of your column:
    TableColumnModel columnModel =
    table.getColumnModel();
    TableColumn column =
    columnModel.getColumn(YOUR_COLUMN);
    column.setPreferredWidth(width);Rizwanthx that was usefull

  • Finder List View: Maintain Column Width

    OSX 10.7.3 - I prefer to use the "list view" option in Finder. With that said, I find it maddening that when I re-open Finder following a session where I had resized the column widths, I have to once again resize column width in order to see the full name of a file (instead of it being truncated.). Is there a way to set up Finder so that the columns stay resized each time I reopen a Finder window.

    There's something in your Finder prefs...
    I tested that and it works as expected.
    Have you tried creating a new account and see how your apps work in that User acct? (That will tell if your problem is systemwide or limited to your User acct.)
    Open System Preferences > Accounts > "+" make it an admin account.
    If this works, then log back into your problem account and Go to Finder "Go" menu hold the option key and choose Library. Then go to Preferences trash these files:
    com.apple.finder.plist
    com.apple.sidebarlists.plist
    Then, restart, or log out and in again.
    (You will have to reset a few finder prefs the way you like them.)

  • How to resize column width in report?

    hi all,
    i read somewhere here that in order to resize column width in a report, you need to go to report attributes, then edit the column you wish to resize and then go to the CSS Style and place something like "width=600px". while this works very well in Internet Explorer, it somehow has no effect in Firefox 3.0. is there a way to make it work both browsers?
    thanks
    allen

    Hi,
    Sorry, I misunderstood. There are several methods you could use:
    1 - Use the span tags around the data itself - this would require adding the tags into the sql statement itself
    2 - Use javascript to set the column widths by adding a style to the TD tags for each cell
    3 - Create a new Report Template and use COL tags immediately after the TABLE tag in the Before Rows section to specify the widths of all columns
    Option 3 may be the easiest?
    Andy

  • Flex 3: DataGrid Column width on resize

    Hello experts,
    I am facing an issue with width of DataGrid columns. We are using Flex 3.2.
    I am setting the widths for columns in creationComplete handler of DataGrid. When the browser window is resized, say restore down and then maximize,
    the column widths are changing. Please find the code below:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="100%" width="100%">
    <mx:Script>
        <![CDATA[
            import mx.core.ScrollPolicy;
            [Bindable]
            private var isVisible:Boolean = true;
            private function creationCompleteHandler():void{
                dataGrid.horizontalScrollPolicy = ScrollPolicy.ON;
                artist.width = dataGrid.width * 0.40;
                album.width = dataGrid.width * 0.50;
                Price.width = dataGrid.width * 0.10;
                dataGrid.horizontalScrollPolicy = ScrollPolicy.OFF;
        ]]>
    </mx:Script>
    <mx:DataGrid id="dataGrid" width="80%" height="100%" creationComplete="creationCompleteHandler()">
          <mx:ArrayCollection>
             <mx:Object Artist="Pavement" Price="11.99"
                Album="Slanted and Enchanted" />
             <mx:Object Artist="Pavement"
                Album="Brighten the Corners" Price="11.99" />
          </mx:ArrayCollection>
          <mx:columns>
              <mx:DataGridColumn id="artist" dataField="Artist"/>
             <mx:DataGridColumn id="album" dataField="Album" visible="{isVisible}"/>
             <mx:DataGridColumn id="Price" dataField="Price" />
          </mx:columns>
       </mx:DataGrid>
    </mx:Application>
    Is there anything wrong i am doing here? Please help me in resolving this.
    Thanks,
    Srilatha

    Hi Srilatha,
    DataGrid width is 100% and the main application width also 100%, So the
    DataGrid will try to occupy the whole window, when you do "restore down" &
    "maximize" Application width will change.. and it will effect DataGrid and
    its columns also. Try to give some fixed width for dataGrid and you can
    expect the result.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    height="100%" width="100%">
        <mx:Script>
            <![CDATA[
                import mx.core.ScrollPolicy;
                private var isVisible:Boolean = true;
                private function creationCompleteHandler():void
                    dataGrid.horizontalScrollPolicy = ScrollPolicy.ON;
                    artist.width = dataGrid.width * 0.40;
                    album.width = dataGrid.width * 0.50;
                    Price.width = dataGrid.width * 0.10;
                    dataGrid.horizontalScrollPolicy = ScrollPolicy.OFF;
            ]]>
        </mx:Script>
        <mx:DataGrid id="dataGrid" width="500" height="100%"
    creationComplete="creationCompleteHandler()">
            <mx:ArrayCollection>
                <mx:Object Artist="Pavement" Price="11.99"
                           Album="Slanted and Enchanted" />
                <mx:Object Artist="Pavement"
                           Album="Brighten the Corners" Price="11.99" />
            </mx:ArrayCollection>
            <mx:columns>
                <mx:DataGridColumn id="artist" dataField="Artist"/>
                <mx:DataGridColumn id="album" dataField="Album"
    visible=""/>
                <mx:DataGridColumn id="Price" dataField="Price" />
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>
    Thanks
    Pradeep Reddy

  • What method should be used for resizing the particular JTable Column width

    I have a four table. Only one table which are on top have a table header. I want that when user resize the topmost table with a mouse other table colume also be resized automatically. So I want to know that what method should be used for resizing the particular JTable Column width.
    Thanks
    Lalit

    maybe you can implement a interface ComponentListener as well as ComponentAdapter with your topmost Table.
    for example:
    toptable.addComponentListener(
    new ComponentAdapter(){
    public void componentResized(ComponentEvent e){
    table1.setSize(....);
    table2.setSize(....);
    /*Optionally, you must also call function revalidate
    anywhere;*/
    );

  • Resize column width for JTable without column headers?

    Hi,
    I find that for me to resize columns of a JTable by using
    mouse dragging, I MUST have column headers and then drag
    column headers to resize them. Is my understanding correct?
    Actually, I need to have a table without header columns.
    How can I use mouse to resize column width by dragging?
    The background for this request is that I am putting a
    complex table as another table's column header and I hope to
    be able to resizing the complex table by mouse dragging.
    Thanks very much,
    David

    Hi,
    I think you have mistake there. Try
    <style type="text/css">
    table.apexir_WORKSHEET_DATA td {
    white-space:nowrap !important;
    td[headers="DESCR"] {
    width:300px !important;
    max-width:300px !important;
    #apexir_DESCR {
    width:10px;
    max-width:300px !important;
    </style>And you can try add
    table.apexir_WORKSHEET_DATA {
    width: 100% !important;
    table-layout: fixed !important;
    }Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Need to increase the column width for KE30 form

    Hi
    When we are running the KE30 in background, spool is generating. However the columns in the output are very narrow (and the information cannot be read). Where do you control this?.
    Eg : Orders B - *3105,54 (Outpput value is not clear and unable to read from the spool)
    I tried to change the column width of forms in KE35 but it doesn't work as expected.
    Expecting you suggestions/assistance on the same.
    Regards
    Aparna

    Hi Aparna,
    First select report output column then from Menu bar Setting -> Number Format, select Factor 1.
    Regards,
    Santosh

  • Table Autofit - Fixed Column Width not actually fixed when resize viewing window

    Using RoboHelp x8.0.2.208
    Generating HTML help (CHM)
    Set the Autofit property for a table as Fixed Column Width
    Generate the CHM file
    The table starts as the size specified
    If I resize the width of the HTML help viewer, the column width shrinks
    I tested generating this project as WebHelp with the same results
    I also went into the Table Properties and specified a Preferred Width for the overall table and for each column.
    I thought this option would set the size of the table based on how I sized it in source and would not resize the table as the viewing window is resized (either the HTML help viewer for CHM or the web browser window for WebHelp).
    It appears the actual behavior is to start at the size specified and resize columns as the viewing window is resized.
    Can someone tell me if I am not setting something correctly?
    As always, thanks for any assistance/direction.
    Michael F Weart

    The "Autofit" option apparently only applies to the Window size you have specified.
    Once you reduce the window size, the HTML table protocol takes over:
    WARNING, WARNING, WARNING!
    I need "this much" space for the widest element in column 1, and I don't care what your settings are.
    Next, I need "this much" space for the widest element in column 2, and I don't care what your settings are.
    Next, I need "this much" space for the widest element in column 3, and I don't care what your settings are.
    Next, I need "this much" space for the widest element in column 4, and I don't care what your settings are.
    etc.
    etc.
    By "widest element," I mean either an image or the longest text string with no separating spaces (ex: SYSTEM_DIAGNOSTICS_PARAMETER_EXTERNAL_ISSUER).
    If you absolutely have to maintain the table the way you want, you might try creating it in a scrap topic, taking a screenshot, and saving that as a GIF file.
    Good luck,
    Leon

  • How can I fix the 1st column width (member) in Planning data forms

    Hi all,
    does anybody know a trick, how I can fix the first column width in planning data forms? I need a composite data form (Planning 9.3.1) and the problem is, that in the first form the member names are longer. So Planning sizes the column as it is needed to display the full member name. The member names of the second data form are shorter, so the data entry cells are not exactly among each other for both data forms and that looks terrible....
    Thanks and kind regards
    André

    There are 3 ways of setting the width in webforms:-
    1. There is a global setting for input box length which has a syntax of FormInputBoxLength=30.
    2. When you specify the format for each of the dimensions you can choose to select the width of either a column heading or a row heading. In the following example, each time you specified the dimension ‘Account’ a format would be applied to its header. The syntax for this would be something like… HeaderOptionAccount=Length:50,Style:font-size: 12pt;font-family: calibri
    3. Each column can have its own width specified. The syntax for this can be setting in each of the column’s code. For example C6=Blank,Style:Background-color:rgb(203,218,231);width:3 would just show a thick vertical line as the width is so small.
    You can not set widths in data grids through the normal settings. You can manually change the widths and save the grid though. This can be done in the xml directly. For example… <HDRWIDTH idx=”0″ width=”50″/>.
    Then load the amended xml file back into the system.

  • How to set column width for Label in Form region?

    In the form region, the label value is a lengthy text, and it does not wrap. How do I make it wrap to a fixed column width?
    Under Home>Application Builder>Application>Page>Edit Page Item,
    i have set "HTML Table Cell Attributes" to width="300", but it still does not wrap. and pushes the field to the right end of the page.
    I am quite sure there are better ways of doing this.

    thanks Simakas for the reply.
    I had set the label template to "Optional" and that was forcing a "nowrap". After unsetting the template, I used your suggestion and it works like a charm. Thanks.

Maybe you are looking for