User Tag List

Results 1 to 10 of 10

Thread: [Problem] Setting Combo Box Field

  1. #1
    No Products Registered

    Join Date
    Oct 2006
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Problem] Setting Combo Box Field

    In addition I have this scenario,

    A combo box which is called Suppliers. At runtime this combo box is blank as it loads in a list of suppliers that the user enters at a previous date.

    In a seperate INI file I am loading, I want the correct supplier to become the selected line in the combo box. So if "DELL" was the string in the INI file I would want DELL to be selected and made the active line in the combo box.

    How can I do this?

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,512
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)

    Re: [Problem] Setting Combo Box Field

    Something like:

    Combo box->Set current line->FindStringExact( "Combo Box", ItemValue( "Ini", "supplier"), 0)
    .:::.Joshtek.:::.

  3. #3
    No Products Registered

    Join Date
    Oct 2006
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Problem] Setting Combo Box Field

    This doesn't seem to work. I'm using the Combo Box in the DialogBox extension in MMF2 Developer. It only has Insert Line, Delete Line or Select Line.

  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Problem] Setting Combo Box Field

    Use Select Line and enter the FindStringExact as an expression for the line to select.

  5. #5
    No Products Registered

    Join Date
    Oct 2006
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Problem] Setting Combo Box Field

    I'm sorry I cannot seem to write the expression :\ I think I'm understanding you guys wrong.

    Could you perhaps do me a tiny example file? It would be very much appreciated (and of course, your name in the credits if you'd like as you have assisted me)

    I would need it to select the line in the ComboBox thats there in the INI file. For simplicities sake heres an INI file to use

    [System]
    Supplier=Dell

    In the combo box please have it highlight Dell automatically out of all the lines in there. Just make up some other bogus entries.

    Oh and finally, please understand this needs to be shown INSIDE the DialogBox extension of MMF2 Developer as its where I'm trying to make this work. Many MANY thanks

  6. #6
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,830
    Mentioned
    82 Post(s)
    Tagged
    2 Thread(s)

    Re: [Problem] Setting Combo Box Field

    The FindStringExact expression is not in the ComboBox control in the DialogBox object... Can't you store the index of the supplier instead of its name in the INI file? If so, do a Select Line (index).

    Yves.

  7. #7
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    England
    Posts
    261
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: [Problem] Setting Combo Box Field

    You could have a hidden ComboBox object in the frame which has the exact same content as the one in the DialogBox and then use the ComboBox object's FindStringExact expression to select the correct item in the DialogBox's ComboBox.

    Alternatively, couldn't you loop through the items in the ComboBox, comparing the item name on each loop, and use that to select the correct item?

  8. #8
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Problem] Setting Combo Box Field

    Ah, I skipped over the part where you mentioned the dialog - either of Robbie's suggestions sound sensible in that case.

  9. #9
    No Products Registered

    Join Date
    Oct 2006
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Problem] Setting Combo Box Field

    Quote Originally Posted by Yves
    The FindStringExact expression is not in the ComboBox control in the DialogBox object... Can't you store the index of the supplier instead of its name in the INI file? If so, do a Select Line (index).

    Yves.
    My worry with this is surely should the user delete a Supplier, then using the index would give inaccurate results. For example if DELL was at the top of the list and used 0 as it's index and HP was 1. If I deleted DELL and HP went to the top then all systems which use DELL would use HP instead.

    I want the ability for users to remove entries in all the different lists I include for flexibility, whether it seems practical or not. I understand should a customer not use a certain supplier anymore that they should still retain information about it for their records... there are going to be people out there who might want to do the opposite and prune their supplier list to only contain active suppliers.

  10. #10
    No Products Registered

    Join Date
    Oct 2006
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Problem] Setting Combo Box Field

    I've combated the problem I believe. I used Robbie's suggestion of using a seperate combo box and then instead of FindStringExact, I grabbed the line number from the combo box (as I get the DialogBox ComboBox to load matching lists) and have it highlighted from there.

    Thanks for the help guys

Similar Threads

  1. Problem with Combo-box in Sub-App, in java stand alone and swf
    By Fernando in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th May 2012, 01:25 PM
  2. What is the Combo Box object expression to read text typed into the combo box?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th December 2011, 07:08 PM
  3. Combo box problem in SWF, first item not showing!
    By Boba Fonts in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 6th January 2011, 07:02 AM
  4. Cursor setting Problem
    By Lillmissthang in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 15th February 2010, 07:36 PM
  5. Problem setting Name (Bug??)
    By TreeHugger in forum Lacewing
    Replies: 6
    Last Post: 18th September 2008, 06:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •