Sie sind nicht angemeldet.

1

Montag, 1. Oktober 2018, 03:56

Combobox - Show more Items

Hi,

I've created two comboboxes.

One on top of the other.

The top one shows only a few items on dropdown.

The second one (below), shows much more items.

Is there a way to specify how many items to show or the size of the dropdown?

Thanks!

2

Montag, 1. Oktober 2018, 08:07

Try to limit the height of tearing.
In the style of "combobox_container_style" , write
onclick="combobox_onclick_event(185);"
185 - max height(example).

combobox.xml line 206. write as follows:

Quellcode

1
2
3
<action name="combobox_onclick_event">
      combobox_openlist(get(name),%1);
</action>


combobox.xml line 453. add the line:

453. clamp(openheight,0,%1);

454. tween(global.layer[get(cbname)].height, get(openheight), get(cb.open_close_speed));

3

Montag, 1. Oktober 2018, 09:27

*thumbsup* THANKS

4

Montag, 1. Oktober 2018, 20:28

I don't know why, but it did nothing for me.

I tried inside and outside a parent layer.

The problem occurs only when the combobox is children of a layer.

And I have 2 of them as children. One opens much more than the other. :/

5

Montag, 1. Oktober 2018, 20:59

Here the drop-down list "List of hotspot" is made on this principle. It's the child layer.

You wrote "onclick" in the style that you use for combobox?

6

Montag, 1. Oktober 2018, 21:12

Yes I did.

I will try to leave only one combobox inside the parent to see if it solves.

7

Donnerstag, 4. Oktober 2018, 20:08

Doesn't work either.

It worked alone, but suddenly it stops showing all options when I add other comboboxes to the scene.

Also I've noticed that on mobile there's a blue arrow that is ugly. Can I change it?

AND.. the most important: I can't select all the options on mobile.
They don't appear in total, even when scrolling. I have to pull the fingers far from the original touch point to see the last options and, when I release the finger, it goes up one or two options in the list.
The use will never be able to select the last ones in mobile.

Why doest it happen?

Thanks!

8

Donnerstag, 4. Oktober 2018, 20:22

My link doesn't work for you either?

9

Donnerstag, 4. Oktober 2018, 20:33

Although in your example it doesn't show all options when opened, at least on mobile I can scroll and see all the options.

On mine I can only do this in desktop. On mobile I can't see/access all options. :(

10

Donnerstag, 4. Oktober 2018, 20:37

Try this
onclick="combobox_onclick_event(name,185);"
onklikk - prescribe not in style, but in the layer of combobox
name - name of the combobox
<action name="combobox_onclick_event">
combobox_openlist(%1,%2);
</action>

11

Donnerstag, 4. Oktober 2018, 21:29

Nothing works! :(

12

Freitag, 5. Oktober 2018, 05:29

In this example , the height is limited for static and dynamic combobox.
Just need to prescribe onklik each combobox.
»San7« hat folgende Dateien angehängt:
  • combobox.xml (20,62 kB - 87 mal heruntergeladen - zuletzt: Heute, 12:23)
  • krpano.xml (7 kB - 93 mal heruntergeladen - zuletzt: Heute, 12:23)

13

Samstag, 6. Oktober 2018, 04:03

Thanks, San!

I decided to get your code (that worked in an empty file) and started from scratch.

I did it differently, but it's working now!! Thanks!!!

Do you know how to change that blue arrow when it's opened?
The grey one is beautiful, but when opened is ugly. I wish it could only rotate that beautiful down arrow. :)

Thanks!!

Ähnliche Themen