ListboxItemText selection brush padding.
Posted: Tue Jul 19, 2016 19:06
Hi,
I'm trying to add a padding to the selection brush in a Combobox. I have created a subclass of ListboxTextItem for creating my custom items. In the constructor of this subclass I am appending the string "[padding='l:5 t:3 r:0 b:3']" to create the required padding, but then, when an item is selected, the combobox selection is showing the formatting tag (it looks perfect in the drop down list) as text.
I have tried to increase the size of 'targetRect' in the ListboxTextItem::draw method but it's adding the padding outside the selection brush, and not looking ok.
How can I accomplish what I want?
CEGUI vesion: 0.7.5
Thanks for your help.
I'm trying to add a padding to the selection brush in a Combobox. I have created a subclass of ListboxTextItem for creating my custom items. In the constructor of this subclass I am appending the string "[padding='l:5 t:3 r:0 b:3']" to create the required padding, but then, when an item is selected, the combobox selection is showing the formatting tag (it looks perfect in the drop down list) as text.
I have tried to increase the size of 'targetRect' in the ListboxTextItem::draw method but it's adding the padding outside the selection brush, and not looking ok.
How can I accomplish what I want?
CEGUI vesion: 0.7.5
Thanks for your help.