Combobox sizing limitation

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Combobox sizing limitation

Postby spannerman » Fri Jan 06, 2006 13:45

Hey,

Im having some trouble with the sizing of combobox's (CVS HEAD and earlier versions iirc). Basically the selected ListboxTextItem's text is not fully displayed correctly, eg.

Image

Notice how the lower section of the 'g' is clipped. Changing the height of the combobox changes the drop down list area and does not affect the area of the selected item. You can not change the size of ListboxTextItem's themselves. Im using the standard "tahoma.ttf".

Any ideas?

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Combobox sizing limitation

Postby lindquist » Fri Jan 06, 2006 16:56

modify the look'n'feel to size the editbox as you'd like.

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Re: Combobox sizing limitation

Postby spannerman » Fri Jan 06, 2006 17:19

Aah ok thanks.

I changed the value of the TaharezLook/Combobox, this part:

Code: Select all

<!--
    ***************************************************
        TaharezLook/Combobox
    ***************************************************
    -->

                <Dim type="Height" >
                    <FontDim type="LineSpacing">
                        <DimOperator op="Multiply">
                            <AbsoluteDim value="1.8" />
                        </DimOperator>
                    </FontDim>
                </Dim>


And that does it.

Question: if I wanted to use a larger font, would I have to make a custom version of the Combobox looknfeel for each differently sized font? If so, its a shame you cant just grap the ComboEditbox and change it dynamically in code.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Combobox sizing limitation

Postby lindquist » Sat Jan 07, 2006 10:00

I think the problem is that the editbox looknfeel clips the text to rect inside it's frame imagery, and the combobox sets the entire editbox to 1.5*fontH. so the editbox's text area is smaller than 1.5*fontH. something like 1.5*fontH-top-bottom.

You could add the sizes of those images in the combobox looknfeel...

Another thing you could do was to create a property to hold the magic constant (1.8) which could then easily be changed from layouts and code.

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Re: Combobox sizing limitation

Postby spannerman » Sun Jan 08, 2006 02:05

Ok thanks Lindquist.

vimes
Just popping in
Just popping in
Posts: 10
Joined: Wed May 24, 2006 00:05

Re: Combobox sizing limitation

Postby vimes » Wed Jun 21, 2006 01:14

spannerman wrote:Aah ok thanks.

I changed the value of the TaharezLook/Combobox, this part:

Code: Select all

<!--
    ***************************************************
        TaharezLook/Combobox
    ***************************************************
    -->

                <Dim type="Height" >
                    <FontDim type="LineSpacing">
                        <DimOperator op="Multiply">
                            <AbsoluteDim value="1.8" />
                        </DimOperator>
                    </FontDim>
                </Dim>


And that does it.

I had the same issue and made this change in TaharezLook.looknfeel but I saw no changes in my layout... I even tried extreme values like 2.5 without any effect is this solution still viable with CEGUI 0.4.1 ?


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 9 guests