ListboxItemText selection brush padding.

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

frigopie
Just popping in
Just popping in
Posts: 8
Joined: Mon Mar 01, 2010 21:37

ListboxItemText selection brush padding.

Postby frigopie » 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.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: ListboxItemText selection brush padding.

Postby YaronCT » Tue Jul 19, 2016 19:39

Cegui 0.7? Gosh, I wasn't even born then.. Let me c what I can do.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: ListboxItemText selection brush padding.

Postby YaronCT » Thu Jul 21, 2016 10:03

@frigopie: In "FalagardEditbox::renderTextNoBidi" search for "hlarea" - it defines the area of the highlight. Try to play with it as u wish. If it works, we'll perhaps add a property that controls its padding.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 8 guests