Direction of ComboBox

Is it possible to control the direction of the combobox? For e.g. my combobox appears in the "south" region on a page, so when i click to list the values, they should be displayed upwards (like the start button in windows).

Hi,
yes I think this is possible, however not so easy.
First of all you have to subclass BasicComboBoxUI, let's call it MyBasicComboBoxUI. There you have to override createPopup() So that is creates no longer an instance of BasicComboPopup, but MyBasicComboPopup (subclas of BasicComboPopup).
And in MyBasicComboPopup you have to override the show() method.
Finally you have to set MyBasicComboBoxUI as the new UI for your ComboBox.
This might work.
Post again if you need more help.
Hope this helps,
Michael

Similar Messages

  • How to influence the up-direction of combobox

    Hi guys,
    All my comboboxes are opening in the direction up.
    Is there a way to influence the opening-direction of a
    combo-box, so I can set this to "down"?
    Thnx!

    You may have to make the rowCount : int smaller

  • How to influence the op-direction of combobox

    Hi guys,
    All my comboboxes are opening in the direction up.
    Is there a way to influence the opening-direction of a
    combo-box, so I can set this to "down"?
    Thnx!

    Adobe Newsbot hopes that the following resources helps you.
    NewsBot is experimental and any feedback (reply to this post) on
    its utility will be appreciated:
    mx.controls.ComboBox (Flex 3):
    ComboBox. listData : BaseListData. When a component is used
    as a drop-in item renderer or drop-in item editor, Flex initializes
    the listData property of the
    Link:
    http://livedocs.adobe.com/flex/3/langref/mx/controls/ComboBox.html
    Tag Archive for combobox at Flex Examples:
    Setting the label color on a disabled ComboBox control in
    Flex. By peterd 0 Comments ... Specifying a custom icon function on
    a ComboBox control in Flex
    Link:
    http://blog.flexexamples.com/tag/combobox/
    Flex 3 - ComboBox control:
    If the ComboBox control is editable, and the user types into
    the control, Flex broadcasts a change event each time the text
    field of the control changes.
    Link:
    http://livedocs.adobe.com/flex/3/html/dpcontrols_5.html
    Customizing the Flex ComboBox controls text input styles at
    Flex:
    The following example shows how you can customize the
    ComboBox controls text input styles by setting the
    textInputStyleName style in Flex.
    Link:
    http://blog.flexexamples.com/2007/12/21/customizing-the-flex-combobox-controls-text-input- styles/
    ComboBox control -- Flex 2.01:
    Flex 2 Developer's Guide > Building User Interfaces for
    Flex Applications > Using Data-Driven Controls > ComboBox
    control
    Link:
    http://livedocs.adobe.com/flex/201/html/dpcontrols_062_10.html
    Displaying item tool tips in a Flex ComboBox control at Flex
    Examples:
    Text for the itemRenderer property of ComboBox. I neither got
    a tooltip nor found the contents to be wrapped around. I am
    learning Flex.
    Link:
    http://blog.flexexamples.com/2008/01/26/displaying-item-tool-tips-in-a-flex-combobox-contr ol/
    Disclaimer: This response is generated automatically by the
    Adobe NewsBot based on Adobe
    Community
    Engine.

  • How edit a combobox class for dropdown direction changing?

    hi all,
         i wanna change the direction of combobox dropdown so How can i edit a combobox class for dropdown direction changing?

    Someone gave me a class file to put into my applet.
    ... Does anyone know how to go
    into the class file and change it? And why can't you ask "someone" for the source? Or ask them to modify it for you?

  • Errors in implementing Text Layout Framework text flow- selection event not found

    please help me i have implemented the same project givan at adobe open source code site.
    This is my code
    <?xml version="1.0" encoding="utf-8"?>
    <!--
    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.
    NOTICE:  Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the Adobe license agreement
    accompanying it.  If you have received this file from a source
    other than Adobe, then your use, modification, or distribution
    of it requires the prior written permission of Adobe.
    -->
    <!-- Demonstrate some example controls.  This example does not attempt to create a control for every property in the TextLayoutFramework -->
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" label="Text Editor Example" initialize="init()" backgroundColor="#FFFFFF" horizontalScrollPolicy="off" verticalScrollPolicy="off">
    <mx:Script>
    <![CDATA[
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.ElementRange;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.Configuration;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.events.StatusChangeEvent;
    import flashx.textLayout.events.SelectionEvent;
    import flashx.textLayout.formats.ITextLayoutFormat;
    import flashx.textLayout.formats.TextLayoutFormat;
    import flashx.textLayout.formats.TextAlign;
    import flashx.textLayout.formats.VerticalAlign;
    import flashx.textLayout.formats.BlockProgression;
    import flashx.textLayout.formats.Direction;
    import flashx.textLayout.tlf_internal;
    import flashx.undo.UndoManager;
    import flash.display.Sprite;
    import flash.system.Capabilities;
    // the textFlow being worked on
    private var _textFlow:TextFlow = null;
    // container to hold the text
    private var _container:Sprite = null;
    // data providers for enumerated list boxes
    static private const textAlignData:Array = [
    { label:"Justify", data:TextAlign.JUSTIFY},
    { label:"Left", data:TextAlign.LEFT},
    { label:"Right", data:TextAlign.RIGHT},
    { label:"Center", data:TextAlign.CENTER},
    { label:"End", data:TextAlign.END},
    { label:"Start", data:TextAlign.START}
    static private const verticalAlignData:Array = [
    { label:"Bottom", data:VerticalAlign.BOTTOM },
    { label:"Justify", data:VerticalAlign.JUSTIFY },
    { label:"Middle", data:VerticalAlign.MIDDLE },
    { label:"Top", data:VerticalAlign.TOP }
    static private const blockProgressionData:Array = [
    { label:"TopToBottom", data:BlockProgression.TB },
    { label:"RightToleft", data:BlockProgression.RL }
    static private const directionData:Array = [
    { label:"LeftToRight", data:Direction.LTR },
    { label:"RightToleft", data:Direction.RTL }
    * initialization
    private function init():void
    // create a sprite to hold the TextLines
    _container = new Sprite();
    textArea.rawChildren.addChild(_container);
    fontFamily.dataProvider = populateFontFamily();
    versionInfo.text = "Vellum: " + flashx.textLayout.BuildInfo.kBuildNumber + (Configuration.tlf_internal::debugCodeEnabled ? " Debug" : " Release")
    + ", Flex: " + mx_internal::VERSION
    + ", Player: " + Capabilities.version;
    * Create an array of available font families
    static private function populateFontFamily():Array
    // really this returns an array of fonts - would be nice to strip it down to just the families
    var fonts:Array = Font.enumerateFonts(true);
    var fontfamily:Array = new Array();
    fonts.sortOn("fontName", Array.CASEINSENSITIVE);
    for(var i:int = 0; i< fonts.length; i++)
    // trace(fonts[i].fontName);
    fontfamily.push({label: fonts[i].fontName, data: fonts[i].fontName});
    return fontfamily;
    /** called to set the size of this panel */
    public function setSize(w:int,h:int):void
    this.width = w;
    this.height = h;
    textArea.width = width;
    textArea.height = height > bottomTabs.height ? this.height-bottomTabs.height : 0;
    if (_textFlow)
    _textFlow.flowComposer.getControllerAt(0).setCompositionSize(textArea.width,textArea.heigh t);
    _textFlow.flowComposer.updateAllControllers();
    /** called when the bottom tabs finally gets sized. */
    private function bottomTabsResize():void
    setSize(width,height);
    /** The TextFlow to edit. */
    public function get textFlow():TextFlow
    { return _textFlow; }
    public function set textFlow(newFlow:TextFlow):void
    // clear any old flow if present
    if (_textFlow)
    _textFlow.flowComposer = null;
    _textFlow = null;
    _textFlow = newFlow;
    if (_textFlow)
    _textFlow.flowComposer.addController(new ContainerController(_container,textArea.width,textArea.height));
    // setup event listeners for selection changed and ILG loaded
    _textFlow.addEventListener(SelectionEvent.SELECTION_CHANGE,selectionChangeListener,false,0 ,true);
    _textFlow.addEventListener(StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE,graphicStatusCha ngeEvent,false,0,true);
    // make _textFlow editable with undo
    _textFlow.interactionManager = new EditManager(new UndoManager());
    // initialize with a selection before the first character
    _textFlow.interactionManager.selectRange(0,0);
    // compose the new textFlow and give it focus
    _textFlow.flowComposer.updateAllControllers();
    _textFlow.interactionManager.setFocus();
    /** Receives an event any time an ILG with a computed size finishes loading. */
    private function graphicStatusChangeEvent(evt:StatusChangeEvent):void
    // recompose if the evt is from an element in this textFlow
    if (_textFlow && evt.element.getTextFlow() == _textFlow)
    _textFlow.flowComposer.updateAllControllers();
    /** Receives an event any time the selection is changed.  Update the UI */
    private function selectionChangeListener(e:SelectionEvent):void
    var selectionState:SelectionState = e.selectionState;
    var selectedElementRange:ElementRange = ElementRange.createElementRange(selectionState.textFlow, selectionState.absoluteStart, selectionState.absoluteEnd);
    // set display according to the values at the beginning of the selection range.  For point selection/characterFormat use getCommonCharacterFormat as that tracks pending attributes waiting for the next character
    var characterFormat:ITextLayoutFormat = _textFlow.interactionManager.activePosition == _textFlow.interactionManager.anchorPosition ? _textFlow.interactionManager.getCommonCharacterFormat() : selectedElementRange.characterFormat;
    var paragraphFormat:ITextLayoutFormat = selectedElementRange.paragraphFormat;
    var containerFormat:ITextLayoutFormat = selectedElementRange.containerFormat;
    updateComboBox(fontFamily,characterFormat.fontFamily);
    fontSize.text = characterFormat.fontSize.toString();
    lineHeight.text = characterFormat.lineHeight.toString();
    updateComboBox(textAlign,paragraphFormat.textAlign);
    textIndent.text = paragraphFormat.textIndent.toString();
    columnCount.text = containerFormat.columnCount.toString();
    columnGap.text = containerFormat.columnGap.toString();
    updateComboBox(verticalAlign,containerFormat.verticalAlign);
    updateComboBox(blockProgression,_textFlow.computedFormat.blockProgression);
    updateComboBox(directionBox,_textFlow.computedFormat.direction);
    /** Helper function to update a comboBox in the UI */
    private function updateComboBox(box:ComboBox,val:String):void
    for (var i:int = 0; i < box.dataProvider.length; i++)
    if (box.dataProvider[i].data == val)
    box.selectedIndex = i;
    return;
    box.text = val;
    * These functions are helpers for the various widgets to actually perform the operations on the TextFlow
    private function changeFontFamily(newFontFamily:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.fontFamily = newFontFamily;
    IEditManager(_textFlow.interactionManager).applyLeafFormat(cf);
    _textFlow.interactionManager.setFocus();
    private function changeFontSize(newFontSize:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.fontSize = newFontSize;
    IEditManager(_textFlow.interactionManager).applyLeafFormat(cf);
    _textFlow.interactionManager.setFocus();
    private function changeLeading(newLeading:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.lineHeight = newLeading;
    IEditManager(_textFlow.interactionManager).applyLeafFormat(cf);
    _textFlow.interactionManager.setFocus();
    private function changeTextAlign(newAlign:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var pf:TextLayoutFormat = new TextLayoutFormat();
    pf.textAlign = newAlign;
    IEditManager(_textFlow.interactionManager).applyParagraphFormat(pf);
    _textFlow.interactionManager.setFocus();
    private function changeTextIndent(newIndent:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var pf:TextLayoutFormat = new TextLayoutFormat();
    pf.textIndent = newIndent;
    IEditManager(_textFlow.interactionManager).applyParagraphFormat(pf);
    _textFlow.interactionManager.setFocus();
    private function changeColumnCount(newCount:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.columnCount = newCount;
    IEditManager(_textFlow.interactionManager).applyContainerFormat(cf);
    _textFlow.interactionManager.setFocus();
    private function changeColumnGap(newGap:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.columnGap = newGap;
    IEditManager(_textFlow.interactionManager).applyContainerFormat(cf);
    _textFlow.interactionManager.setFocus();
    private function changeVerticalAlign(newAlign:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.verticalAlign = newAlign;
    IEditManager(_textFlow.interactionManager).applyContainerFormat(cf);
    _textFlow.interactionManager.setFocus();
    private function changeBlockProgression(newProgression:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.blockProgression = newProgression;
    IEditManager(_textFlow.interactionManager).applyFormatToElement(_textFlow,cf);
    _textFlow.interactionManager.setFocus();
    /** Set direction on the rootElement.  This effects both columnDirection and default reading order. */
    private function changeDirection(newDirection:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var pf:TextLayoutFormat = new TextLayoutFormat();
    pf.direction = newDirection;
    IEditManager(_textFlow.interactionManager).applyFormatToElement(_textFlow,pf);
    _textFlow.interactionManager.setFocus();
    ]]>
    </mx:Script>
    <!-- <mx:VBox horizontalScrollPolicy="off" verticalScrollPolicy="off" width="100%" height="100%"> -->
    <mx:Canvas id="textArea" width="520" height="400"/>
    <mx:TabNavigator id="bottomTabs" width="100%" creationPolicy="all" paddingLeft="4" paddingBottom="8" backgroundColor="#D9D9D9" color="#202020" horizontalScrollPolicy="off" verticalScrollPolicy="off" resize="bottomTabsResize()">
    <mx:HBox label="Text" backgroundColor="#D9D9D9" width="496" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    <mx:Label text="Font:"/>
    <mx:ComboBox id="fontFamily" editable="true" enter="changeFontFamily(fontFamily.text)"  close="changeFontFamily(fontFamily.text)" width="200"/>
    <mx:Label text="Size:"/>
    <mx:TextInput id="fontSize" enter="changeFontSize(fontSize.text)" width="40"/>
    <mx:Label text="LineHeight:"/>
    <mx:TextInput id="lineHeight" enter="changeLeading(lineHeight.text)" width="40"/>
    </mx:HBox>
    <mx:HBox label="Para" backgroundColor="#D9D9D9" width="496">
    <mx:Label text="Alignment:"/>
    <mx:ComboBox id="textAlign" close="changeTextAlign(textAlign.selectedItem.data)" dataProvider="{textAlignData}"/>
    <mx:Label text="FirstLineIdent:"/>
    <mx:TextInput id="textIndent" enter="changeTextIndent(textIndent.text)" width="40"/>
    </mx:HBox>
    <mx:HBox label="Container" backgroundColor="#D9D9D9" width="496">
    <mx:Label text="Columns:"/>
    <mx:TextInput id="columnCount" toolTip="auto or a number" enter="changeColumnCount(columnCount.text)" width="40"/>
    <mx:Label text="Gap:"/>
    <mx:TextInput id="columnGap" toolTip="a number" enter="changeColumnGap(columnGap.text)" width="40"/>
    <mx:Label text="VerticalAlignment:"/>
    <mx:ComboBox id="verticalAlign" close="changeVerticalAlign(verticalAlign.selectedItem.data)" dataProvider="{verticalAlignData}"/>
    </mx:HBox>
    <mx:HBox label="Flow" backgroundColor="#D9D9D9" width="496">
    <mx:Label text="Progression:"/>
    <mx:ComboBox id="blockProgression" close="changeBlockProgression(blockProgression.selectedItem.data)" dataProvider="{blockProgressionData}"/>
    <mx:Label text="Direction:"/>
    <mx:ComboBox id="directionBox" close="changeDirection(directionBox.selectedItem.data)" dataProvider="{directionData}"/>
    </mx:HBox>
    <mx:HBox label="Version" backgroundColor="#D9D9D9" width="496">
    <mx:TextInput id="versionInfo" editable="false" width="100%"/>
    </mx:HBox>
    </mx:TabNavigator>
    <!-- </mx:VBox> -->
    </mx:VBox>

    Probably something is going wrong when the application is being built, and textLayout.SWC is not found. Are you using Flex or Flash Pro to build it? What version? Does this error come up when you build the project, or when you run it?
    Thanks,
    - robin

  • How to use Combobox to direct link

    Hi all, how can i use combobox to direct link in adf. For example: I have a list of value with combobox, when i selected "Page A" ---> go to Page A, selected "Page B" ----> go to Page B
    Thanks

    Hi,
    How about using a menu model instead of a combo box? Check out this example : Oracle JDeveloper 11g Release 2 Tutorials - Creating ADF Menus for Page Navigation
    -Arun

  • Property for setting combobox drop down direction

    How edit a combobox class for drop down direction changing? like this

    Java8 renders ALL of the UI really poorly, which is another issue entirely.
    I've located the cause of my problem. When you create a ComboBox with SceneBuilder, the FXML creates this by default:
    <items>
    <FXCollections fx:factory="observableArrayList">
    <String fx:value="Item 1" />
    <String fx:value="Item 2" />
    <String fx:value="Item 3" />
    </FXCollections>
    </items>
    I'm actually loading the list via a database lookup, something like:
    myCombo.setItems(myList);
    The problem is that when the drop down is first rendered, it's using the string widths from the initial list of strings to calculate the drop down dimensions.
    I have "solved" the problem in my app by creating the combobox in code and adding it to the scene, in which case everything works correctly. It would be nice if there was a way to tell the combobox to recalculate it's preferred sizes after a list was added/updated, but I'm unable to find a method that might do that (tried Node.autosize() without success).

  • Combobox performance is very slow

    Hello,
    Can anyone please provide some suggestions on my issue. I have implemented a combobox item using the plugin below and it was a very helpful plugin.
    http://www.apex-plugin.com/oracle-apex-plugins/odtug-competition/combobox_208.html
    My issue is my data is very huge around 145k records and the page load is taking time and also the combobox is also very slow. I have a address field on which I have implemented the combobox plugin. My requirement is users login to the application and will search the application to find a particular customer account using the address. So the users once they login, they will directly start typing the address to find the customer account.
    Please help, with any valuable suggestions to help improve the performance of the combobox item.
    Thanks,
    Orton

    orton607 wrote:
    Hello,
    Can anyone please provide some suggestions on my issue. I have implemented a combobox item using the plugin below and it was a very helpful plugin.
    http://www.apex-plugin.com/oracle-apex-plugins/odtug-competition/combobox_208.html
    My issue is my data is very huge around 145k records and the page load is taking time and also the combobox is also very slow. I have a address field on which I have implemented the combobox plugin. My requirement is users login to the application and will search the application to find a particular customer account using the address. So the users once they login, they will directly start typing the address to find the customer account.
    Please help, with any valuable suggestions to help improve the performance of the combobox item.
    Thanks,
    OrtonThere won't be any issue with data because 145k is nothing, I have setup an example here on half million records (500k) and it works fine
    http://apex.oracle.com/pls/apex/f?p=1983:27
    login as test/test
    As you have more data in the table I guess you have set the Lazy Load to Yes.
    you have to do explain plan on your LOV sql and see if you can add an index on the address column.
    Thanks,
    Vikram

  • Trouble skinning AS2 ComboBox component

    I'm using Flash CS3 and want to create a custom ComboBox. I've followed the steps outlined in "Editing component skins in a new document" (http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?cont ext=Flash_MX_2004&file=00002045.html#1120753), but every time I get to the step where I drag the ComboBox Assets folder from the HaloTheme.fla library into my library, if I test movie at that point my combobox has become an unclickable white rectangle with no label, button or anything. Am I doing something wrong? Any suggestions would be welcome.
    Thanks!

    start with a new fla and follow the directions.

  • How do I limit typing in a ComboBox Dropdown list

    I’ve created a form and added a ComboBox which generated the code:
    this->DateList = (gcnew System::Windows::Forms::ComboBox());
    this->SuspendLayout();
    // DateList
    this->DateList->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12,
    System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
    static_cast<System::Byte>(0)));
    this->DateList->FormattingEnabled = true;
    this->DateList->Location = System::Drawing::Point(91, 7);
    this->DateList->Name = L"DateList";
    this->DateList->Size = System::Drawing::Size(121, 28);
    this->DateList->TabIndex = 0;
    this->DateList->SelectedIndexChanged += gcnew System::EventHandler(this,&Form1::DateList_SelectedIndexChanged);
    And then I added some custom code to add the items to the DateList
    for ( int x = numSnapShots - 1 ; x >= 0 ; x-- )
      String ^ item = gcnew String ( SnapShots[x]->dateStr );
        this->DateList->Items->Add(item);
    this->DateList->SelectedIndex = 0;
    All is working fine, I can select any Snapshot date I want from the list. 
    The problem is that I can also type anything I want in the ComboBox. 
    The dropdown of 12/31/2014 is in the list, but I can also type “Last Year” and of course the code doesn’t know how to handle that.
    What item in the combobox do I have the change to what to disable the user’s ability to type in the combobox?

    David,
    Maybe I didn’t look hard enough, but I could not find a way to create a C# WinForms project and include my existing C++ code as is and then interface the form front end to the existing C++ logic.
    I did find relatively easy ways for a C++ CLI Windows Forms Application to communicate with standard C++. 
    I had to limit the data types that I passed pack and forth, but the link up was relatively easy.
    I have externals in Form1.h which can then simply call the primary C++ interface:
    extern std::string str;
    extern std::string strPage;
    extern std::string strDate;
    extern
    void Initialize();
    extern
    int RebuildPage(int);
    Initialize() is called right after Initialize Component() to load all the data into memory and build the first HTML page.
    if (RebuildPage(7))    
    RefreshThePage();
    Exists for most of the button clicks and dropdown selections. 
    The number tells the C++ code what form control was clicked and a nonzero return tells the form to refresh the page. 
    Refresh the page is a simple Form1.h method that does just that, changes the labels on the form header and refreshes the HTML string to the new HTML data created by the C++ logic.
    void RefreshThePage(void)
    this->webBrowser1->DocumentText =
    gcnew String( str.c_str() );
    this->ViewLabel->Text =
    gcnew String( strPage.c_str() );
    this->DateLabel->Text =
    gcnew String( strDate.c_str() );
    This allowed me to perform all of the complex operation in the existing code with minimal changes, like changing the fprintf’s that created the original HTML files into str.append logic to pass the pages directly to the form.
    It’s true that all of my other code was batch style console applications, but the form front end was not totally difficult to learn and the simple fixes like David Lowndes just suggested makes the coding even easier. 
    Thanks again Dave.
    I created a very complex program to make visualizing mutual fund trends very simple. 
    The problem with the batch console application was that if I wanted to stop highlighting symbol ABC and wanted to start highlighting XYZ, I had to modify a data file by hand and then rerun the batch process to recreate the entire website on my local
    drive so I could not instantly see the change.  Using a form front end and building and displaying the pages interactively make that process instant.

  • VBA:comboboxes to present same date in different formats...ADAPT WITH CHANGE IN DATE

    Hi all, 
    I'm very new to VBA and excel development, so please take that into consideration as you read on.
    I'm trying to create a work form for a database that (should) collect various information in comboboxes, including the date, the weekday, and the month... Note: most of the time, the data will be inserted the day after it's been collected. So, I wanted to create
    one combobox for the date, one for the weekday, and one for the month, because I want columns for each of these in the database (If this is not necessary/efficient, please help! :) ) . 
    Here's what I've got so far:
    'worksheet setup
    Dim ws As Worksheet
    Set ws = Worksheets("LookupList")
    'Date dropdown setup
    Dim cDateToday As Range
    For Each cDateToday In ws.Range("DateList")
    With Me.cboDate
    .AddItem cDateToday.Value
    End With
    Next cDateToday
    'If today is Monday, then set date to last friday, if any other weekday, set it to day before that
    If Weekday(Date - 1) <> 2 Then
    Me.cboDate.Value = Format(DateAdd("D", -Weekday(Date) - 1, Date), "Medium Date")
    Else
    Me.cboDate.Value = Format(Date - 1, "Medium Date")
    End If
    Problem #1: Right now, I am getting the date values from the list
    DateList in the worksheet LookupList...is there a better way of doing this?
    Problem #2: When the user form is run, the correct date and format shows up. However, if I change the date, the dropdown list in the combobox starts from the initial date in given list...is there anyway to bring the list closer to the current
    date? Think Calendar View
    Problem #3: I want the weekday and month values to be directly correlated to the date value discussed above, so hypothetically when the user form is run the correct date, weekday, and month all show up (based on the same date value), then if
    I change the date, the weekday and month automatically update. Is this possible, if so how?
    The reason I want this functionality is so that on a Monday, I can run the work form and it will automatically have Friday's date, weekday, month info as it opens. When I'm done with Friday, I can run it again, switch the date to the Saturday's
    date (weekday and month automatically update), then repeat for Sunday.
    I have tried running the same code for the weekday and month as I have for the date, and they work
    until the date is changed. Once the date is changed, I have to manually change the weekday, which leads to format change, and same for month, which all leads to :( and confusion
    Again, I am very new to vba and don't know much about it all and appreciate any/all help!
    Thanks in advance!
    /Alex

    I can give you a little advice but I don't understand your comment "if I change the date, the weekday and month automatically update" Where do you want them to update?
    I am assuming that your entire question is referring to a Userform with the Combobox. Is this correct?
    The code can be much simpler to populate the combobox list. You already have a named range for the Dates so you can use that directly to populate the RowSource. (RowSource if the combox is on a Userform or ListFillRange for a combobox on a worksheet).
    Then the WorksheetFunction Workday can be used to get the previous workday without weekend days. It also looks after the previous day when the actual date is mid week. Look up the function on the worksheet Help because you can also have a separate list
    of holidays that will be excluded like weekend days.
    If you are new to VBA then a tip about Help. You need to be on the worksheet and click Help to get worksheet help and in the VBA editor you click Help to call the VBA help. Don't just select Help off the taskbar when changing between the worksheet and VBA
    because you will finish up with the incorrect Help file.
    Example of code to assign a named range to the RowSource of a ComboBox. Named range needs to be Global and not scoped to a worksheet otherwise the worksheet name is also required. 
        Me.cboDate.RowSource = "DateList"
    Example of code to assign the previous workday to the combobox value.
        'Following line sets value to previous workday (Mon to Friday)
        Me.cboDate.Value = WorksheetFunction.WorkDay(Date, -1) 
    Then there is another problem with ComboBoxes and dates. If the Dates are real dates on the worksheet (Not Text)  then the dropdown list displays in the same format as the worksheet but when the date is selected, it displays as a serial number. This
    can also be rectified with code but first I need to know what the format of the data is on the worksheet.
    Can you upload a copy of your workbook because it is like a picture is worth a thousand words. Same goes for having a copy of the workbook. If it has sensitive data then create a copy and remove the sensitive data.
    Regards, OssieMac

  • How to add the data to combobox

    how to add data directly into
    info swing component jcomboboxcontrol in jdevloper.
    can any one help.
    thanks
    sweety

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by pullareddyj:
    u just addlike following method for insert
    data in combobox.
    "comboBoxControl1.addItem("jan");"
    pullareddy<HR></BLOCKQUOTE>
    THANKS
    SWEETY

  • Populating a Combobox using Remoting with AMF and PHP

    Hello all
    I am using Zend framework and Flex 3.4 to create a webapp. I am stuck at how to populate a combobox dynamically using the service I created in PHP.
    In some of examples I saw that result of database query was being converted into XML and then sent to Flex. This seems a little too time-consuming if I have to do it every time. I saw some examples in Adobe Docs about Remoting with AMF and PHP. That seems like a better approach although how it would be applicable here is beyond me right now.
    Can somebody guide me in correct direction?
    Thanks and Regards
    Shivik

    Try this: http://code.google.com/p/as3flexdb/ is very easy to use and it
    will help.
    All you need to populate a combo is:
    <mx:ComboBox dataProvider="{query.Records} /

  • Problem with combobox

    I have a panel in table view. One of the fields, I have changed to a combo box. It works good except for one problem. When testing, I set the text in the field using the combo box. If I go directly to another record, in the same column, when i change that record, the one i had changed in the previous record changes also. It's like it has never lost focus of the previous record. I can click in another field in the previous record before going to the new record and it works OK. Any suggestions???
    Thanks, William

    Look in the API under combobox, there are 2 constructors there that may interest you--one for an array and another for a vector. Make your return object of either of those and you'll be fine.He's been told to use an array as the parameter several times, all to no avail. I'm beginning to lose hope for this one.Ok I'm sorry I've not got it yet but I just don't understand. Let me try again.
    I have a method in my other class
    private ArrayList< String > Quizbook= new ArrayList< String >(); // at the top of the program declaring it.
    public ArrayList getwhole() // the method to return it
    return Quizbook;
    }So that method returns the Quizbook which is an Array? am I right so far?
    Then in my other class I have
    JComboBox Answer = new JComboBox(Vector (Q.getwhole));Q is an object in that previous class and '.getwhole' bieng the above method. that returns the array Quizbook. so surely I am using the array as the parameter?
    And then I looked up the api and it says:
    JComboBox
    public JComboBox(Vector items)
    Creates a JComboBox that contains the elements in the specified Vector. By default the first item in the vector and therefore the data model) becomes selected.
    Parameters:
    items - an array of vectors to insert into the combo box
    See Also:
    DefaultComboBoxModel
    so if items is the parameter that you are saying should be an array then how come it isn't in the way I'm doing it the method I'm telling it to call getwhole which returns the array??
    I know its probaly very tedious repeating things but It would help me alot if you could just go over it again explaining exactly where I'm going wrong.

  • Populating a ComboBox from DB query

    Hello –
    I have created a ComboBox to allow users to choose a category
    as a filter for a products catalog. The list of categories is
    returned by one of the functions of a ColdFusion CFC I’m
    using in the app; it has been tested and examined in the debugger
    and is returning the correct ArrayCollection.
    For now, I have ended up hard coding the ArrayCollection that
    populates the ComboBox, like this:
    <mx:ComboBox id="series" styleName="glass" width="250"
    rowCount="16"
    change="someFunction();">
    <mx:dataProvider>
    <mx:ArrayCollection>
    <mx:Object label="All Categories" data="0"/>
    <mx:Object label="Interlocking Puzzles" data="1"/>
    <mx:Object label="Math Games" data="2"/>
    // etc. - 16 categories
    </mx:ArrayCollection>
    </mx:dataProvider>
    </mx:ComboBox>
    Of course, the above works fine, but I would prefer to use
    the CFC. I tried something like:
    <mx:ArrayCollection id="categList"
    source="mx.utils.ArrayUtil.toArray(roService.roMethod.result);"
    <mx:ComboBox dataProvider="{categList}" />,
    but I don’t know how to tell the component what the
    ‘label’ is and what the ‘data’ is . I am
    sure this is an easy one for someone with a little experience.
    Please, somebody, give me an idea how to code this, or at least
    where I can look it up. I have read the whole help material, but
    can’t figure it out.
    Regards,
    Carlos

    For top-level properties of your item objects (which I think
    you will have), just specify the labelField. For values in nested
    objects, or for calculated or concatenated columns, you wil need to
    use a labelFunction.
    I advise against binding directly to the result
    ("lastResult", to be specific when binding) and advise using a
    result handler function in which you can inspect the exact
    structure of the event.result object (just "result" in an event
    handler).
    To work up to this, why not hard code a bit of dataProvider
    that is EXACTLY what you think you will be getting from the CFC.
    Put it in a [Bindable] variable and bind the combobox dataProvider
    to that. Use labelField or labelFunction to get the combobox to
    work with that, then implement the data service call, and in its
    result handler, assign the event.result to the bindable variable.
    Voila!
    Tracy

Maybe you are looking for

  • How can i find my stoled man book ???

    my mac book ware stoled from mycar yestrday  and( find my mac) is already installed but i dont know the apple id or i cloud id but i have the serial no. is there is any way to track my mac and rerurn it back ? important

  • Get Spotlight to search everywhere

    Hi everyone, I consider myself a pro user, certified Apple tech, sys admin, blabla. Sometimes I need to configure plists manually or edit some hidden/system files. I know how to search for these using a Finder search window and the kind dropdown menu

  • Can't find After Effects user guide.

    I just installed Production Premium CS5.5 a couple of days. One of the optional downloads is the Functional Content for After Effects. The description says that it contains templates, footage and a user guide not included with the trial version. I've

  • I'm getting an error message once I log into my Lakeland Acct. is read an OID problem

    My college recommended that I download Firefox. I was able to log into our Blackboard yesterday. But, today it's providing andOID error message and will not allow me to log into Blackboard.

  • Pointing a Class script to a library item dynamically

    Hey all, So it's straight forward to: create a library item point it at a class script addChild(new Class()) Bosh,  and then it does on the canvas whatever the script associated says it should do! I would love to be able to: create library items with