[Solved] How to make scrollable textfield

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

gams
Not too shy to talk
Not too shy to talk
Posts: 39
Joined: Sun May 24, 2015 13:23

[Solved] How to make scrollable textfield

Postby gams » Thu May 28, 2015 14:15

Hi
I'm trying to make scrollable text field and actually I had this already working on 0.7 but it seems the window behavior isn't the same for 0.8. Basically I want just have textfield wich gets filled with text and it should have scollbars so user can scroll the text.

Any ideas how to do this?

here's my current layoyt:



Code: Select all


<GUILayout version="4">
    <Window name="consolewin" type="TaharezLook/FrameWindow">
        <Property name="Text" value="Console" />

        <Property name="TitlebarEnabled" value="True" />
        <Property name="Area" value="{{0.263284,0},{0.00487818,0},{0.713728,0},{0.17223,0}}" />
        <Window name="scrollbar" type="TaharezLook/ScrollablePane">
            <Property name="ContentArea" value="l:0 t:-57 r:543 b:31" />
            <Property name="HorzStepSize" value="0.1" />
            <Property name="VertStepSize" value="0.1" />
            <Property name="HorzOverlapSize" value="0.01" />
            <Property name="Area" value="{{0.0163356,0},{0.0479946,0},{0.98442,0},{0.902048,0}}" />
            <Property name="VertOverlapSize" value="0.01" />
            <Property name="HorzScrollPosition" value="0" />
            <Property name="VertScrollPosition" value="0" />
            <AutoWindow namePath="__auto_container__">
                <Property name="ContentArea" value="l:0 t:-57 r:500 b:300" />
            <Property name="Area" value="{{0.0,0},{0.0,0},{1,0},{1,0}}" />

                <Window name="conTextfield" type="TaharezLook/StaticText">
                   
                    <Property name="VertFormatting" value="TopAligned" />
                    <Property name="Area" value="{{0,0},{0,0},{0.99,0},{0.8,0}}" />
                </Window>
            </AutoWindow>
        </Window>
    </Window>
</GUILayout>

Last edited by gams on Thu May 28, 2015 16:44, edited 1 time in total.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: How to make scrollable textfield

Postby Ident » Thu May 28, 2015 16:21

You simply need a StaticText window. Nothing else.

It took me 1 second to google for this ( https://www.google.com/search?q=text+sc ... lbar+cegui ) and find a solution viewtopic.php?t=3665

Please use the search function next time to see if the question is already answered.
CrazyEddie: "I don't like GUIs"

gams
Not too shy to talk
Not too shy to talk
Posts: 39
Joined: Sun May 24, 2015 13:23

Re: How to make scrollable textfield

Postby gams » Thu May 28, 2015 16:44

Ident wrote:You simply need a StaticText window. Nothing else.

It took me 1 second to google for this ( https://www.google.com/search?q=text+sc ... lbar+cegui ) and find a solution viewtopic.php?t=3665

Please use the search function next time to see if the question is already answered.


thank you very much. i should have googled but was puzzled because the code i had worked on 0.7.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 8 guests