Right click on item in ListBox?

0 favourites
  • 3 posts
From the Asset Store
A fantastic package of 117 high-quality & game-ready sound effects for User Interface, Items, Power-Ups, and more!
  • Hello there!

    Is there a way to right click an item inside a ListBox object? There is only an option to check for left click in the event system.

    Or alternatively is there a way to simulate left clicking? I could check for right click on the ListBox object and then simulate left click to choose the right item in the list (where the mouse right clicked) and then just start the "right click on list" events.

    And if that is not possible either is there a way to see the height of the items inside the list? Then I could use mouse.x, mouse.y, listbox.x, listbox.y and listbox.itemheight (or something like that) to calculate where it was right clicked.

    Thank you in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ListBox is an html form element and comes with a lot of limitations. If you want finer control you'll want to build a custom listbox. One way is to create a text or spritefont object for each item, pin them to an invisible helper sprite to control scrolling, and using blending modes to crop the visible area (clipping mask).

  • Thank you. I will do this. I think I will use tween for the scrolling.

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