How can I set the List objects type at runtime?

0 favourites
  • 7 posts
From the Asset Store
Template for scrollable list, fully documented in comment and video
  • Hello together!

    I like to use functions for objects that I create regularly.

    Now my problem is that I do not know how the List objects type attributes are called internally. "List box" and "Dropdown list" do both not work if I set the type to these.

    Although the List objects types are called "List box" and "Dropdown list" in the properties inside the editor these do not seem to be the right type names.

    I tried to somehow log the lists javascript object to see if there is the type shown.

    Unfortunately, no. Or I can't read them.

    Does anybody know Ashley how I can see the available object attributes for a given object?

    Thank you in advance!

    Edit:

    I want to add that with the Text input object modifying the type at runtime did indeed work. "Text", "Password", "Email", "Number" etc.

  • Looks like there is no action to change listbox type.

    What you can try is the new templates feature - create several listboxes on a separate (unused) layout, configure them as you like. And then set them as templates and give them template names. Then you should be able to create a specific listbox by specifying the template name, for example "password_input".

    construct.net/en/make-games/manuals/construct-3/project-primitives/objects/templates

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello together!

    I like to use functions for objects that I create regularly.

    Now my problem is that I do not know how the List objects type attributes are called internally. "List box" and "Dropdown list" do both not work if I set the type to these.

    Although the List objects types are called "List box" and "Dropdown list" in the properties inside the editor these do not seem to be the right type names.

    I tried to somehow log the lists javascript object to see if there is the type shown.

    Unfortunately, no. Or I can't read them.

    Does anybody know Ashley how I can see the available object attributes for a given object?

    Thank you in advance!

    Edit:

    I want to add that with the Text input object modifying the type at runtime did indeed work. "Text", "Password", "Email", "Number" etc.

    Unfortunately it cannot be changed.

    But you can compare.

    For example, you can find out its type

    "dropdown list" or "listbox".

    Inside the game you can get its type.

  • Looks like there is no action to change listbox type.

    What you can try is the new templates feature

    It should work with the set attribute action. For the input object I can use set attribute and as the attribute I can put the string "Type" and then put "Password" as the value and it succesfully changes the input object to password type. It is inconsistent that this does not work with the list object. Or maybe it does but we don't know the true attribute names.

    Anyways, thanks for the template suggestion. It is indeed a good workaround. I will stick with that!

    Inside the game you can get its type.

    Thanks but I need to change the type.

  • Are there any updates on this? How can the list object type be changed in runtime like with the input object?

  • You need to post a suggestion / feature request. Although it's pointless to do this now, because the current suggestion platform will be replaced with a new one soon.

  • Okay thank you. Than I will just stick to using templates and use my suggestion votes for multiplayer or native android export features (lol) instead. :D

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)