View Single Post
05/20/16, 08:23 AM   #5
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
Originally Posted by sirinsidiator View Post
If you only need one line you may be able to fake it.
Just center the editbox and grow it as more characters are added (OnTextChanged).
You can get the necessary width with the help of a hidden label and GetTextWidth.
In order to make clicking the textbox work like usual, just add a click handler to the background and let it give focus to the editbox via the TakeFocus method.
The problem with fake editboxes is, that the user input text does not grow into both directions, that's what a centered text should do

Didn't know backdrops accept click handler functionality? :O
  Reply With Quote