Change Vertical Scrollbar width in advanced datagrid?

Help!
I'm creating an AIR application that will run on windows 8 touchscreen.  Problem is the touchscreen does not recognize finger swiping up/down within the air app.  Haven't figured that out yet....
In the meantime i need wider vertical scrollbars for our employees fingers to swipe up and down.
I've got a 'verticalSrollBarStyle' set however it doens't seem to react to 'width = x "
Can anyone help me increase the width of the scroll bars?
thanks!

OK, this is because in a search item you can use as many wildcards as you like: 'A%b%cdef%'.
If you want to restrict the maximum length, you need to make a custom template for findTextInput.vm and add the following macro:
#ITEM_MAXIMUM_LENGTH()
Steven Davelaar,
Jheadstart team.

Similar Messages

  • Width of vertical scrollbar on multicolumn listbox

    I am working on a touchscreen enabled user interface and need to "übersize" all the controls for fat-fingered individuals such as myself.  For the life of me, I can't figure out how to widen the vertical scrollbar and make the change permanent.  I can adjust the width customizing the control and everything is great...  Until I close the .vi and reopen it.  Then the scrollbar width reverts back to its normal skinny self.  I've tried making the custom control a typedef, but it doesn't help.  How do I make this change stick?
    Thank you,
    Greg

    Greg,
    I've just modified a MCLB's scroll bar width (customising the control) as you describe, saved the VI, then reopened the VI...
    With LV 7.0 the customised control stays modified - fine.
    With LV 8.0 the reloaded customisation of the control is "erroneous" - it appears that instead of reloading with the scroll bar wider, it reloads with the scroll bar normal but with the central object area box expanded to meet the scroll bar (or something like that).
    There has to be a problem there with LV version 8 - I think you should get on to NI support and report this issue.
    Mark.

  • Spark list and vertical scrollbar

    Hi,
    i have this problem (that seems a common problem):
    I have a List that is bound with an ArrayCollection that is populated with a push data provider that send to me a sport event (with a lot of properties).
    I have also an event map where i put the event into (a simply hashtable).
    If the event doesn't exists in the map i'll add to an ArrayCollection, if the event exists i'll change only its properties (a code snippet):
    var event:LiveEvent = tableMap[changedEvent.row_id];
    if (event) {
         if (changedEvent.active==false) {
              events.removeItemAt(getEventByRowId(events,event.row_id));
              tableMap[changedEvent.row_id]=null;
         else {
              var i:Number;
              event.signgroups = changedEvent.signgroups;
              event.name = changedEvent.name;
              event.betstatus=changedEvent.betstatus;
    after this i force a refresh to the dataprovider (events.refresh();) that cause the verticall scroll bar of the list to jump up.
    I've read into a previous post (that was using a datagrid and not a list) that the refresh is needed only when thare are new UID, so in my case if only the properties changed its value it "should" not needed. But if i don't put the refresh my list is not updated.
    I've also tried to get/set the vertical scroll bar position using:
    eventList.scroller.verticalScrollBar.value = myOldPosition
    but there is someone (i bet some events) that change the scrollbar position after my function.
    How i can prevent to change the scrollbar position or (would be great) avoid the refresh() call?
    this is my list definition:
    <s:List dataProvider="{events}" changing="setItem()" id="eventList" width="300" itemRenderer="itemsrenders.EventItemrender" height="{this.height-90}">

    LiveEvent is a remote object class:
        [RemoteClass(alias="com.isitech.live.beans.Event")]
        public class LiveEvent
            public var row_id:Number;
            public var name:String;
    so event that is a private var is not bindable. Should i declare it global and make it Bindable?

  • How do you change the scrollbar size in the listbox control

    I have what appears to be abug with the vertical scrollbar on the listbox control.  I am trying to make the verticle scrollbar wider (so it is easier to press with your finger on a touch panel).  I open the control in "customize control," change the scrollbar, and apply changes.  The scrollbar is wider and it works in my original VI.  Now I close LabVIEW and open it again.  The scrollbar is back to it's original width.  I have also tried saving it as a strict type def and the same thing happens.  How do I get the scrollbar to stop shrinking back to it's original width everytime I reopen the VI.  I need it to stay the same width for an executable as well.
    Thanks,
       Javi

    I have the same problem.  Has anyone found a work around?  Must be a bug.  See attached screen shots for before, and after restart.
    Attachments:
    Lg ListBox screenshot.gif ‏66 KB
    Lg ListBox screenshot - after restart.gif ‏65 KB

  • Can't change tool panel width

    I drew a red circle where should be these vertical lines showing that i can change the width of the panel, but they are missing with some of the windows (color and paragraph at the moment), at the beginning it was ok, but at some point the color panel got static and i wasn't able to decrease it's with, at that that point it wasn't that huge, but now that bug occurred again and it got even bigger this time. Can anyone please help me before my whole screen is full of this tool panel
    The other tool windows work properly, as soon as i switch the window, the vertical lines appear and i can change the toolpanel width, but changing back to color or paragraph, it's not possible the change it anymroe
    Thanks in advance,
    Andres

    Try resetting the workspace. If that doesn't work, try Replace Your Preferences

  • Vertical scrollbar not showing all the records when I scroll down.

    Vertical scrollbar not showing all the records when I scroll down.
    Using Oracle forms 10g , operating system windows
    I have two fields with number of items dispayed = 15.
    I have a vertical scroll bar with them. There are 34 records in the table but the scrollbar only shows 15 records.
    Here are the properties for block / scrollbar.
    WORK_CATEGORY
    - Subclass Information                           
    - Comments                                       
    * Navigation Style                                Same Record
    - Previous Navigation Data Block                 
    - Next Navigation Data Block                     
    - Current Record Visual Attribute Group          
    - Query Array Size                                0
    - Number of Records Buffered                      0
    * Number of Records Displayed                     60
    * Query All Records                               No
    - Record Orientation                              Vertical
    * Single Record                                   No
    - Database Data Block                             Yes
    - Enforce Primary Key                             No
    - Query Allowed                                   Yes
    - Query Data Source Type                          Table
    * Query Data Source Name                          WORK_CATEGORY
    * Query Data Source Columns                      
    * Column Name                                   JOB_TYPE
    * Column Type                                   VARCHAR2
    - Column Type Name                             
    - Parent Column                                
    * Length                                        30
    * Precision                                     0
    * Scale                                         0
    * Mandatory                                     Yes
    * Column Name                                   WORK_CATEGORY
    * Column Type                                   VARCHAR2
    - Column Type Name                             
    - Parent Column                                
    * Length                                        30
    * Precision                                     0
    * Scale                                         0
    * Mandatory                                     Yes
    - Query Data Source Arguments                    
    - Alias                                          
    - Include REF Item                                No
    * WHERE Clause                                   
    * ORDER BY Clause                                 job_type
    - Optimizer Hint                                 
    - Insert Allowed                                  Yes
    - Update Allowed                                  Yes
    - Locking Mode                                    Automatic
    - Delete Allowed                                  Yes
    - Key Mode                                        Automatic
    - Update Changed Columns Only                     No
    - Enforce Column Security                         No
    - Maximum Query Time                              0
    * Maximum Records Fetched                         0
    - DML Data Target Type                            Table
    - DML Data Target Name                           
    - Insert Procedure Name                          
    - Insert Procedure Result Set Columns            
    - Insert Procedure Arguments                     
    - Update Procedure Name                          
    - Update Procedure Result Set Columns            
    - Update Procedure Arguments                     
       Don't know where am I going wrong. I'll really appreciate if you can help me in this.
    Thanks.
    Edited by: 831050 on Sep 14, 2011 8:05 AM

    One of the items is a list item.. here are it's properties:
    * Name                                          JOB_TYPE
    * Item Type                                     List Item
    - Subclass Information                         
    - Comments                                     
    - Help Book Topic                              
    - Enabled                                       Yes
    * Elements in List                             
    * Label                                      
    * List Item Value                             LIST20
    * List Style                                    Combo Box
    - Mapping of Other Values                      
    - Implementation Class                         
    - Case Restriction                              Mixed
    - Popup Menu                                   
    - Keyboard Navigable                            Yes
    - Mouse Navigate                                Yes
    - Previous Navigation Item                     
    - Next Navigation Item                         
    - Data Type                                     Char
    - Data Length Semantics                         Null
    - Maximum Length                                30
    - Initial Value                                
    * Required                                      Yes
    * Copy Value from Item                         
    - Synchronize with Item                        
    - Calculation Mode                              None
    - Formula                                      
    - Summary Function                              None
    - Summarized Block                             
    - Summarized Item                              
    - Current Record Visual Attribute Group        
    - Distance Between Records                      0
    * Number of Items Displayed                     15
    - Database Item                                 Yes
    * Column Name                                   JOB_TYPE
    - Primary Key                                   No
    - Query Only                                    No
    - Query Allowed                                 Yes
    - Insert Allowed                                Yes
    - Update Allowed                                Yes
    - Update Only if NULL                           No
    - Visible                                       Yes
    * Canvas                                        CANVAS2
    - Tab Page                                     
    * X Position                                    47
    * Y Position                                    137
    * Width                                         187
    * Height                                        18
    - Visual Attribute Group                        DEFAULT
    - Prompt Visual Attribute Group                 DEFAULT
    - Foreground Color                             
    * Background Color                              white
    - Fill Pattern                                 
    - Font                                         
    * Font Name                                     Tahoma
    * Font Size                                     10
    * Font Weight                                   Demilight
    * Font Style                                    Plain
    * Font Spacing                                  Normal
    * Prompt                                        Job Type
    - Prompt Display Style                          First Record
    * Prompt Justification                          Start
    * Prompt Attachment Edge                        Top
    - Prompt Alignment                              Start
    * Prompt Attachment Offset                      10
    * Prompt Alignment Offset                       0
    - Prompt Reading Order                          Default
    - Prompt Foreground Color                      
    - Prompt Font                                  
    * Prompt Font Name                              Tahoma
    * Prompt Font Size                              10
    * Prompt Font Weight                            Bold
    * Prompt Font Style                             Plain
    * Prompt Font Spacing                           Normal
    - Hint                                         
    - Display Hint Automatically                    No
    - Tooltip                                      
    - Tooltip Visual Attribute Group               
    - Direction                                     Default
    - Initial Keyboard State                        Default
    - Keyboard State                                Any
        

  • Advanced DataGrid - Renderers - Possible to reference the columnIndex parameter?

    When working with AdvancedDataGridRendererProvider in an Advanced Datagrid -- Is it possible for renderer code to reference the columnIndex parameter of the AdvancedDataGridRendererProvider?
    Thanks.

    //*** START ActionScriptRenderer.as
    package
        import mx.controls.Label;
        import mx.controls.advancedDataGridClasses.AdvancedDataGridListData;
        import mx.controls.listClasses.BaseListData;
        import mx.controls.listClasses.IDropInListItemRenderer;
        import mx.controls.listClasses.IListItemRenderer;
        import mx.core.UIComponent;
        public class ActionScriptRenderer
            extends UIComponent
            implements IListItemRenderer, IDropInListItemRenderer
            private var _label : Label;
            private var _data : Object;
            private var _listData : BaseListData;
            private var _listDataChanged : Boolean = true;
            public function set data( value : Object ) : void
                _data = value;   
            public function get data() : Object
                return _data;
            public function set listData(
                value : BaseListData ) : void
                _listData = value;
                _listDataChanged = true;
                invalidateProperties();
            public function get listData() : BaseListData
                return _listData;
            protected override function createChildren() : void
                super.createChildren();
                _label = new Label();
                addChild( _label );
            protected override function commitProperties() : void
                super.commitProperties();
                if ( _listDataChanged &&
                    _listData != null )
                    _label.text = listData.label;
                    _label.toolTip = getToolTip();
                    _listDataChanged = false;
            protected override function updateDisplayList(
                unscaledWidth : Number,
                unscaledHeight : Number ) : void
                super.updateDisplayList(
                    unscaledWidth,
                    unscaledHeight );
                _label.move( 0, 0 );
                _label.setActualSize(
                    unscaledWidth,
                    unscaledHeight );   
            private function getToolTip() : String
                var adgListData : AdvancedDataGridListData =
                    AdvancedDataGridListData( _listData );
                var result : String = "";
                result += "Label: " + adgListData.label + "\n";
                result += "Column Index: " + adgListData.columnIndex + "\n";
                result += "Data Field: " + adgListData.dataField + "\n";
                result += "Data Field Value: " + adgListData.item[ adgListData.dataField ] + "\n";
                result += "Row Index: " + adgListData.rowIndex + "\n";
                result += "Depth: " + adgListData.depth + "\n";
                result += "Has Children: " + adgListData.hasChildren;
                return result;
    //*** END ActionScriptRenderer.as
    //*** START ListDataDemo.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical">
        <mx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                 [Bindable]
                 private var dpADG:ArrayCollection = new ArrayCollection([
                   {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
                   {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99},
                   {Artist:'Saner', Album:'A Child Once', Price:11.99},
                   {Artist:'Saner', Album:'Helium Wings', Price:12.99},
                   {Artist:'The Doors', Album:'The Doors', Price:10.99},
                   {Artist:'The Doors', Album:'Morrison Hotel', Price:12.99},
                   {Artist:'Grateful Dead', Album:'American Beauty', Price:11.99},
                   {Artist:'Grateful Dead', Album:'In the Dark', Price:11.99},
                   {Artist:'Grateful Dead', Album:'Shakedown Street', Price:11.99},
                   {Artist:'The Doors', Album:'Strange Days', Price:12.99},
                   {Artist:'The Doors', Album:'The Best of the Doors', Price:10.99}
            ]]>
        </mx:Script>
        <mx:Label
               text="MxmlRenderer"
               color="#ffffff"
               fontWeight="bold"/>
        <mx:AdvancedDataGrid
            height="250"
            width="500"
            rowHeight="25"
            dataProvider="{ dpADG }">
            <mx:columns>
                <mx:AdvancedDataGridColumn
                    dataField="Artist"/>
                <mx:AdvancedDataGridColumn
                    dataField="Album"/>
                <mx:AdvancedDataGridColumn
                    dataField="Price"/>  
            </mx:columns>
            <mx:rendererProviders>           
                <mx:AdvancedDataGridRendererProvider
                    renderer="MxmlRenderer"
                    columnIndex="0"/>
                <mx:AdvancedDataGridRendererProvider
                    renderer="MxmlRenderer"
                    columnIndex="1"/>
                <mx:AdvancedDataGridRendererProvider
                    renderer="MxmlRenderer"
                    columnIndex="2"/>        
            </mx:rendererProviders>
        </mx:AdvancedDataGrid>
           <mx:Label
               text="ActionScriptRenderer"
               color="#ffffff"
               fontWeight="bold"/>
           <mx:AdvancedDataGrid
            height="250"
            width="500"
            rowHeight="25"
            dataProvider="{ dpADG }">
            <mx:columns>
                <mx:AdvancedDataGridColumn
                    dataField="Artist"/>
                <mx:AdvancedDataGridColumn
                    dataField="Album"/>
                <mx:AdvancedDataGridColumn
                    dataField="Price"/>  
            </mx:columns>
            <mx:rendererProviders>           
                <mx:AdvancedDataGridRendererProvider
                    renderer="ActionScriptRenderer"
                    columnIndex="0"/>
                <mx:AdvancedDataGridRendererProvider
                    renderer="ActionScriptRenderer"
                    columnIndex="1"/>
                <mx:AdvancedDataGridRendererProvider
                    renderer="ActionScriptRenderer"
                    columnIndex="2"/>        
            </mx:rendererProviders>
       </mx:AdvancedDataGrid>
    </mx:Application>
    //*** END ListDataDemo.mxml
    //*** START MxmlRenderer.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas
        xmlns:mx="http://www.adobe.com/2006/mxml"
        implements="mx.controls.listClasses.IDropInListItemRenderer">
        <mx:Script>
            <![CDATA[
                import mx.controls.advancedDataGridClasses.AdvancedDataGridListData;
                import mx.controls.listClasses.BaseListData;
                [Bindable]
                private var _listData : BaseListData;
                public function set listData( value : BaseListData ) : void
                    _listData = value;
                public function get listData() : BaseListData
                    return _listData;
                private function getToolTip(
                    listData : BaseListData ) : String
                    var adgListData : AdvancedDataGridListData =
                        AdvancedDataGridListData( listData );
                    var result : String = "";
                    result += "Label: " + adgListData.label + "\n";
                    result += "Column Index: " + adgListData.columnIndex + "\n";
                    result += "Data Field: " + adgListData.dataField + "\n";
                    result += "Data Field Value: " + adgListData.item[ adgListData.dataField ] + "\n";
                    result += "Row Index: " + adgListData.rowIndex + "\n";
                    result += "Depth: " + adgListData.depth + "\n";
                    result += "Has Children: " + adgListData.hasChildren;
                    return result;
            ]]>
        </mx:Script>
        <mx:Label
            id="canvasLabel"
            text="{ _listData.label }"
            toolTip="{ getToolTip( _listData ) }"/>
    </mx:Canvas>
    //*** END MxmlRenderer.mxml

  • Vertical taskbar width does not hold the width after reboot

    Hi.
    I wonder if anyone could help me with this. I've been trying to google the answer for hours but no luck.
    I use the desktop with taskbar on the left side not on the bottom. I'll explain why just to cut questions. Simply because it makes more sense to me to have it on side rather than bottom with 16/9 format of display. I also work with many windows open at the
    same time and this way I can have 15 of them on the taskbar without grouping.
    Problem.
    I need the width of the taskbar to be wide enough at least for 3 icons of the quicklaunch section. Below this width there is not enough space for quick launch icons to fit in the area. I could increase the area but then it uses space for the open windows
    tabs and also date/time are not displayed fully. 3 icons is what makes sense for vertical taskbar. Every time I change the width of the taskbar to 3 it goes back to 2 after reboot. No matter whether I lock it or not!
    question.
    Is there any way of setting the minimal height ( in my case width of the taskbar as it is positioned vertically on the side) in the registry? I mean can I enter somewhere " do not go below bloody 3 icons after reboot ! " in the registry  :)
    There must be default value somewhere there  and this is why it keeps going back to it. If only I knew where is it I could increase it to suit me.
    I know it might seem to be silly question but after resizing the taskbar 2 348 times over the past years eveytime I turn the computer on I have had enough.
    I would be very gratefull if anybody could help me. Thanks in advance.

    Refer :
    http://social.technet.microsoft.com/Forums/windows/en-US/2b0ba279-0ded-49b2-b003-713a65e3d645/vertical-taskbar-width-resets?forum=w7itproui
    Arnav Sharma | Facebook |
    Twitter Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members
    reading the thread.

  • Stocked array vertical scrollbar'​s theme mixed between modern and system??

    I enabled the vertical scrollbar for an array display in the front panel and apparently the modern themed array control has a system themed scrollbar. Also, the vertical and horizontal scrollbars from the modern control palette are also system themed controls. Did NI puposeply implemented it that way?
    In the mean time, What can I do to replace the array veritcal scrollbar with a modern style, shown on the second image. The difference themed scrollbar is very distracting - take a look at the Compare.png image. Please help.
    Thanks in advance,
    James Pham
    Message Edited by VRspace4 on 09-18-2007 01:25 AM
    Attachments:
    Mismatched Theme.png ‏5 KB
    Proper Modern Theme.PNG ‏5 KB
    Compare.png ‏378 KB

    Christian -- No you are not missing anything, there is no system array container.  What Elizabeth meant to say was to use a system listbox and a modern/classic array with a system control inside it.
    James -- Unfortunately there is no way to change the way the array scrollbar looks.  The modern listbox has the same style scrollbar as the modern graphs.  I can only assume that as the array scrollbars were added in a later version this was overlooked.
    Interestingly enough the classic controls consistently use the same scrollbar type (see screenshot).
    Another option would be to use a modern scrollbar placed over the modern listbox in leu of the built in scrollbar.  This would require a little programming to implement (namely wiring the value of the scrollbar to the listbox's "TopRow" property and then possibly some more code to account for the length of the array/scrollbar) but it is an option if you prefer the look of the modern controls.  This would look something like this:
    I hope this helps and, as Elizabeth mentioned above, this has been reported to R&D as something we need to look at.
    Regards,
    Simon H
    AE Team Manager
    National Instruments
    Message Edited by Simon H on 09-19-2007 07:17 PM
    Attachments:
    Screenshot4.png ‏32 KB
    Screenshot5.png ‏8 KB

  • AdjustPopupWidth will not work properly, if there is a vertical scrollbar

    Previously, I am using "adjustPopupWidth", so that my JComboBox will be width enough, to display all the items in drop down list.
    However, I realize when there is present of vertical scrollbar, "adjustPopupWidth" will not generate a correct width, to display all items in the drop down list. This cause a horizontal scrollbar to be shown as well (which is not what I want)
    An example of code is as follow :
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * NewJFrame.java
    * Created on Dec 30, 2010, 12:35:42 AM
    package javaapplication24;
    import java.awt.Component;
    import java.awt.Dimension;
    import javax.swing.JPopupMenu;
    import javax.swing.JScrollBar;
    import javax.swing.JScrollPane;
    import javax.swing.event.PopupMenuEvent;
    import javax.swing.event.PopupMenuListener;
    import javax.swing.plaf.basic.BasicComboPopup;
    * @author yccheok
    public class NewJFrame extends javax.swing.JFrame {
        // Resize JComboBox dropdown doesn't work without customized ListCellRenderer
        private void adjustPopupWidth() {
            if (jComboBox1.getItemCount() == 0) return;
            Object comp = jComboBox1.getUI().getAccessibleChild(jComboBox1, 0);
            if (!(comp instanceof JPopupMenu)) {
                return;
            JPopupMenu popup = (JPopupMenu) comp;
            JScrollPane scrollPane = (JScrollPane) popup.getComponent(0);
            //Object value = this.getItemAt(0);
            //Component rendererComp = this.getRenderer().getListCellRendererComponent(null, value, 0, false, false);
            //if (rendererComp instanceof JXTable) {
            //    scrollPane.setColumnHeaderView(((JTable) rendererComp).getTableHeader());
            BasicComboPopup basic = (BasicComboPopup)comp;
            Dimension prefSize = basic.getList().getPreferredSize();
            Dimension size = scrollPane.getPreferredSize();
            size.width = Math.max(size.width, prefSize.width);
            scrollPane.setPreferredSize(size);
            scrollPane.setMaximumSize(size);
            // Do we need to call revalidate?
            //scrollPane.revalidate();
        private void adjustScrollBar() {
            final int max_search = 8;
            // i < max_search is just a safe guard when getAccessibleChildrenCount
            // returns an arbitary large number. 8 is magic number
            JPopupMenu popup = null;
            for (int i = 0, count = jComboBox1.getUI().getAccessibleChildrenCount(jComboBox1); i < count && i < max_search; i++) {
                Object o = jComboBox1.getUI().getAccessibleChild(jComboBox1, i);
                if (o instanceof JPopupMenu) {
                    popup = (JPopupMenu)o;
                    break;
            if (popup == null) {
                return;
            JScrollPane scrollPane = null;
            for (int i = 0, count = popup.getComponentCount(); i < count && i < max_search; i++) {
                Component c = popup.getComponent(i);
                if (c instanceof JScrollPane) {
                    scrollPane = (JScrollPane)c;
                    break;
            if (scrollPane == null) {
                return;
            scrollPane.setHorizontalScrollBar(new JScrollBar(JScrollBar.HORIZONTAL));
            scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        private PopupMenuListener getPopupMenuListener() {
            return new PopupMenuListener() {
                @Override
                public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
                    // We will have a much wider drop down list.
                    adjustPopupWidth();
                @Override
                public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
                @Override
                public void popupMenuCanceled(PopupMenuEvent e) {
        /** Creates new form NewJFrame */
        public NewJFrame() {
            initComponents();
            // Have a wide enough drop down list.
            jComboBox1.addPopupMenuListener(this.getPopupMenuListener());
            adjustScrollBar();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            jComboBox1 = new javax.swing.JComboBox();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "long long long long long string", "Item 8", " " }));
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(140, 140, 140)
                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(152, Short.MAX_VALUE))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(269, Short.MAX_VALUE))
            pack();
        }// </editor-fold>
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrame().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JComboBox jComboBox1;
        // End of variables declaration
    }Removing "Item 1" till "Item 7", will cause vertical scroll bar not being shown. Hence, "adjustPopupWidth" will work correctly.
    It seems that the calculation within "adjustPopupWidth", should take account into the vertical scroll bar. But how?
    Thanks.

    [url http://www.camick.com/java/blog.html?name=combo-box-popup]Combo Box Popup handles this.

  • How to add vertical scrollbar to a tree region

    Hi,
    I have a page containing two regions. The first is a tree region displayed on the left hand side of the page. The second is form region displayed to the right of the tree, showing details relating to the selected node from the tree.
    How can I add a vertical scrollbar to the tree, so that I can I browse all nodes in the tree without affecting the position of the form? Currently, if my tree extends beyond the height of the page I have to use the page vertical scrollbar to view the bottom of the tree. This obviously means that the form is no longer in view.
    Thanks
    Andrew.

    Hi Andrew,
    You can't add a scrollbar directly to the region's contents, but you can wrap the contents within a DIV tag.
    In the Region Header add in:
    &lt;DIV style="height:500px; overflow:auto"&gt;
    In the Region Footer add in:
    &lt;/DIV&gt;
    Obviously, change the height value to suit your needs.
    Regards
    Andy

  • Change the column width on the fly

    Dear all,
    I have a problem, i have a matrix report, the row is "the project name" and the column is "the items" using within each project, and the problem is the items are variable from time to time the report run for each project, so its exceeds the paper width.
    And the question is, is there any way to change the width of the column on the fly, i mean dynamiclly change the column width each time the report is called to make all items fit the paper width.
    Thank u

    i don't think that we can change the layout of the column in reports
    The simple solution for that problem is that u have to
    fix the horizontal and vertical layout of the text item
    better is to post this problem at reports forum
    Najeeb

  • Drag and Drop in DataGrid/Advanced DataGrid

    Hi All,
    Here is the scenario, assume that i have some 10 records in
    DataGrid/Advanced DataGrid .I have selected 4th record and when i
    try to drag the selected item to
    down, i should be able to drag all the records one step down
    from the selected record( from 4 th record to 10th record)
    i.e, re-arranging the items
    If i drag the selected item(assume that some 6th record) to
    top, say to 2nd row then from the second row all the rows
    has to come down.
    And How do we
    add the rows at middle and at the specified position?
    Any help will be appricated and Thanks in Advance.

    Hi All,
    myself got the solution for re-arranging the datagrid items
    by using the pre-defined properties of DataGrid.
    I can also get the index number of Items while start dragging
    but the problem is how do i get the index number where the Items
    dropped.
    Here is the code..............
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="horizontal">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.collections.ArrayCollection;
    [Bindable]
    private var datagridData:ArrayCollection = new
    ArrayCollection([
    {task:"testing drag and
    drop",category:"Office",priority:"Medium"},
    {task:"testing datagrid
    DND",category:"personal",priority:"High"},
    {task:"testing services for
    todo",category:"office",priority:"Medium"},
    {task:"meet ravi on
    sunday",category:"personal",priority:"Low"},
    {task:"buy a book",category:"friends",priority:"Medium"},
    {task:"play cricket",category:"friends",priority:"Low"}]);
    private function onDragStart():void
    Alert.show("selected Indices"+dataGrid.selectedIndices);
    private function onDragComplete():void
    Alert.show("selected Indices"+dataGrid.selectedIndices);
    ]]>
    </mx:Script>
    <mx:DataGrid id="dataGrid" dataProvider="{datagridData}"
    dragEnabled="true" dragMoveEnabled="true"
    dropEnabled="true" allowDragSelection="true"
    allowMultipleSelection="true" rowCount="10"
    dragStart="onDragStart()"
    dragComplete="onDragComplete()">
    <!--dragStart="onDragStart()"-->
    <mx:columns>
    <mx:DataGridColumn dataField="task" headerText="Task"
    width="200"/>
    <mx:DataGridColumn dataField="category"
    headerText="Category"/>
    <mx:DataGridColumn dataField="priority"
    headerText="Priority"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>

  • Grouping issue on Advanced DataGrid

    Hello,
    I've got an advanced datagrid with 5 columns, The number_Group column has data like this...
    1-10
    1-10
    11-20
    11-20
    11-20
    21-30
    21-30
    21-30
    41-50
    101-110
    When I apply Grouping, it works as expected but the 101-110 group is displayed before the 11-20 group.
    I've tried to set groupingField.numeric = true but that screws it up even more... because 11-20 isn't a number I'm guessing.
    Does anyone know a way around this? I could change the number_Group column to this...
    1
    1
    11
    11
    21
    41
    101
    and groupingField.numeric = true should work but I need the Grouping display to show 1-10, 11-20. Perhaps I can intercept this and modify it?
    Anyone got any ideas?
    Thanks,
    Nick

    Hi, Nicky
    u can solve this problem by grouping function.
    u create ur dataprovider like
    private var myData:ArrayCollection = new  ArrayCollection([{data1:1, data2:10,......},
                                                                                         {data1:1, data2:21, ....}]);
    u declare the grouping function in following manner
    private function myGroupLabelFunction(item:Object, column:AdvancedDataGridColumn):String
    // here u write ur logice to formatting ur dispalying data in advance grid.
    //suppose ur labelfield of datagrid are data1,data2, data3 respectively.
    return item.data1+"-"+item.data2;
    if u do in this way i think it will work.
    if u sucess then give me mark.
    Thanks
    Niranjan

  • Change length of attributes in Advanced Search

    JDeveloper 11.1.1.0.2 and JHeadstart 11g TP1.
    I have a question about changing the length (width) of attributes in Advanced Search in JHeadstart:
    I have a varchar2(6) field and In JAG I have used the following values:
    Java type = String
    Display type = TextInput
    In my application this field has 6 characters (= OK).
    But when I use Advanced Search in my application the field is much longer than 6 characters. I can fill in everything I want. Is there a way to change this so I can only use 6 characters in de the search field?

    OK, this is because in a search item you can use as many wildcards as you like: 'A%b%cdef%'.
    If you want to restrict the maximum length, you need to make a custom template for findTextInput.vm and add the following macro:
    #ITEM_MAXIMUM_LENGTH()
    Steven Davelaar,
    Jheadstart team.

Maybe you are looking for