Currently if one autosized the masked controls they use the character "M" to calculate the size of the control, this oversizes the control quit a bit.
E.g. I have a 50 character masked control and it gets sized to 558 pixels, entering this text:
"lets have some text which is 50 characters long --"
uses 260 pixels, using "M"*50 uses the full control size.
With the attached patch applied the masked control is getting sized to 310 pixels, which is still 50 pixels larger then is needed for the above text, but if the majority of characters is of a wide type like the "M" then the control doesn't show it all, but still accepts it.
The attached uses instead of "M" the characters "FDSJKLREUI" which are the characters placed in the "center" of the keyboard.
The adjust factor for the combobox is bigger to account for the down arrow.
Currently if one autosized the masked controls they use the character "M" to calculate the size of the control, this oversizes the control quit a bit.
E.g. I have a 50 character masked control and it gets sized to 558 pixels, entering this text:
"lets have some text which is 50 characters long --"
uses 260 pixels, using "M"*50 uses the full control size.
With the attached patch applied the masked control is getting sized to 310 pixels, which is still 50 pixels larger then is needed for the above text, but if the majority of characters is of a wide type like the "M" then the control doesn't show it all, but still accepts it.
The attached uses instead of "M" the characters "FDSJKLREUI" which are the characters placed in the "center" of the keyboard.
The adjust factor for the combobox is bigger to account for the down arrow.
Any chance this would be accepted?
My first go at this was too naive, while it worked in my application when I remembered to check the demo this morning I noticed issues with smaller masked controls, so attached is my second try at this.