Combo Box Help - Please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • mingwingming
    Forum Member
    • Jan 2005
    • 17

    Combo Box Help - Please

    I`m having a problem with the combobox (A user problem!!)

    I have a drop down box - Now when looking at the Combo Box at first view I want it to Say in the Box [ Choose Vehicle..] then when you click the box it shows the 2 pages (choices) that the client would go to, now when I first run my Project it shows everything as I wish but should I jump between the pages the Initial (Choose Vehicle) prompt dissapears once I return to any of the pages that I have already visited, so How do I keep that text at the top of my ComboBox. (seems simple but not for me!!)

    Below is how I have it setup at present.

    If I click the Combo Box and then go to "Properties Window", in the "Items list" I have added the [ Choose Vehicle..] text that I would like shown at the top of the ComboBox, on the script side of things I have it setup as follows

    ON SELECT
    nIndex = ComboBox.GetSelected("wiring diagrams - info");
    iText = ComboBox.GetItemText("wiring diagrams - info", nIndex);
    Page.Jump(iText);

    ON FOCUS
    -- delete all items in the combobox
    ComboBox.ResetContent("wiring diagrams - info");

    -- populate combobox with suitable items
    ComboBox.AddItem("wiring diagrams - info", "Wiring Diagrams - Auxiliary");
    ComboBox.AddItem("wiring diagrams - info", "Wiring Diagrams - Hydrostatic - Unidrive");


    I hope that makes some sense. Any assistance would be welcomed.

    Thankyou
  • rhosk
    Indigo Rose Customer
    • Aug 2003
    • 1698

    #2
    I think what you're looking for is -

    "ComboBox.SetSelected(yourpluginname, "Choose Vehicle...");

    Just put it on the page's 'On Show' event.
    Regards,

    -Ron

    Music | Video | Pictures

    Comment

    • Darryl
      Indigo Rose Staff Member
      • Jul 2001
      • 1908

      #3
      Hi mingwingming,

      If your goal is to reinitialize the combo box each time the page is visited, try configuring the initial settings on the On Show event of the page (Page > Properties, On Show tab). Every time that page is shown, it will run those actions to configure the combo box as you wish.

      I believe that will accomplish your goal.

      Hope that helps.

      Darryl

      Comment

      • mingwingming
        Forum Member
        • Jan 2005
        • 17

        #4
        Thanks guys for your replys unfortunately this noob is not getting far.

        If I add

        ComboBox.SetSelected("Wiring Diagrams - Info", "Choose Vehicle...");

        to the "On Show" page (the same pages as the combo box), i`m still presented with the same scenario.

        Where initially the Combo Box will show the "Choose Vehicle" text on view and if you click the combo box it then shows the 2 pages I would like the box to jump to, but as soon as I click the combo box the "Choose Vehicle" text dissapears or if I jump to one of those 2 pages and then return the "Choose Vehicle" text has gone.. Am I going MAD!! the other pages I am jumping to use basically the same combo box to jump back and forth.

        (Hope your getting the idea)

        Do you have any other ideas or example, or any more info I could provide you with to help you help me...

        Comment

        • rhosk
          Indigo Rose Customer
          • Aug 2003
          • 1698

          #5
          Very simple example attached. You should be able to expand from here. I sorta gave you wrong info in my initial response. When you 'SetSelected" you need to choose the index number of the box (sorry) and not a string set -I was thinking 'SetText'......

          Anyway, see if this helps you out.
          Attached Files
          Regards,

          -Ron

          Music | Video | Pictures

          Comment

          • mingwingming
            Forum Member
            • Jan 2005
            • 17

            #6
            Superb thanks for the example really apreciate it, not had a chance to check it out yet, will look more into it Monday, if I get any grief I`m sure i`ll be back !! Anyhow I do have faith, for now I just need to get home , sit in the back garden and have a couple of bottles of becks !!

            Thanks Again

            Comment

            • mingwingming
              Forum Member
              • Jan 2005
              • 17

              #7
              Awesome, so simple when you see these examples..
              Are their any other places that show obvious examples for noobs like me.. I been collecting a few that I have found via this site , but the more places I can grab eaxmples the better..

              Thankyou Very Much..

              Actually another test for you experts how do I open a pdf from a combo box ? Up till now i been using listbox but in certain situations the combo box would be far neater. Sorry if i`m pushing my luck on examples !!
              Last edited by mingwingming; 06-29-2005, 03:17 AM.

              Comment

              Working...
              X