I have a data entry application, with (among other things) a textbox for recording comments. These comments are specific to the data being entered, and often times are redundant (same comment given for a range of data records).
I’m planning to add a combobox with a canned selection of comments to cover the most common situations. When one is selected from the combobox, the comment textbox is populated with the canned comment.
However, I also need the ability to enter additional comments after the canned message, within the textbox. But I don’t want it to be possible for the canned message to be altered. All entered comments need to come after the canned comment.
Is there a way to apply static text to a textbox which cannot be altered, but still allow text to be entered below it?
The only idea I’ve come up with so far is to catch TextInput events and continually overwrite the beginning of the textbox content with the canned message, but the result wouldn’t exactly be pretty.
Perhaps overwrite a
TextBoxtemplate so that it contains aPanelwith the Canned MessageComboBoxand a regularTextBoxfor user input.Style the inner
TextBoxso it doesn’t have the regular TextBox border, and style theComboBoxso that when it doesn’t have focus it doesn’t show it’s border either.When the ComboBox has focus, it will look like a ComboBox inside a TextBox, and if it doesn’t have focus it will just look like one big TextBox