Skip to main content
Zui
Senior
September 20, 2019
Question

Extend the click-able area of a button to the left

  • September 20, 2019
  • 1 reply
  • 504 views

I have a bunch of toggle buttons wich are on the leftmost area of the screen, but i need them to be selectable through the whole screen width. Is there any alternative of setWidth() function? because that sets width only from starting position to the right, but i need to the left (and if i put togglebutton to the left, the image will be draw in incorrect place)

This topic has been closed for replies.

1 reply

Martin KJELDSEN
Principal III
September 20, 2019

You have the source code for buttons, so it's possible to do extend it anyway you want.

You could also "steal" the click at the view level and check if the coordinate intersects with the button along the width of the screen.

What do you think?

/Martin