Page 1 of 1

5.1 MVC Left/Right Icon Click To Open Window

Posted: September 23rd, 2022, 5:44 pm
by shalomsims
I'll cut straight to it. Here's how to setup left or right icon clicks inside a text field control in MVC.
Here I have a TextBox with a right icon click that opens a widget.

Screenshot 2022-09-23 155434.png

To set this up find the icon search from your webpage's canvas on the right panel. You can also select the (?) icon that takes you to Google's icon page. You can use anyone of the google icons. In my case I want the magnifying glass.
Screenshot 2022-09-23 162950.png

Then go the the textbox control and add an event on the right/left icon click and select the event that you want invoked. In my case I want to open a widget window. So, this is what my control would look like.

Screenshot 2022-09-23 163345.png
Screenshot 2022-09-23 163740.png
In this case I am not passing any parameters to my widget so this would be all that I would need to do here.