List box issue

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

sudhakar
Just popping in
Just popping in
Posts: 17
Joined: Wed Dec 21, 2011 16:46

List box issue

Postby sudhakar » Tue Mar 11, 2014 12:21

I have a CEGUI listbox on which some text is displayed. but text is too big to display in one row
so it got truncated from the screen. please let me know how to display the rest of the text in the next row if the text in the row is too big to display
in a single row.


it is a multicolumn list shell.

here string is a long text which can not be fit in row

// Auto- format the column widths with the widest data we have in each column
m_List.NewRow() << "Reset Column Width " << "123456789012345678901234567890123456789012345678901234567890123456789012345678901234" ;
m_List.ResizeColumns();
m_List.RemoveRow(0);

m_List.NewRow() << string;

here string is a long text which can not be fit in row

I want to limit listbox character per line/row. For every 80 char it should go to next row,
if the line is bigger than 80 char. but i am not sure how to create a row on the fly in the list box
based on the above condition. i used the wordwrap for static text in Listbox. but it did not work.

Please let me know how to proceed on this.


Appreciate your help.

Thanks,
Sudhakar

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: List box issue

Postby Kulik » Tue Mar 11, 2014 17:59

When asking for help: Always post your CEGUI.log and the text of any error or exception messages. Thank you!

The code you posted does not look like CEGUI API. especially the NewRow, ResizeColumns and RemoveRow methods.

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

Re: List box issue

Postby Ident » Tue Mar 11, 2014 19:22

Kulik wrote:The code you posted does not look like CEGUI API. especially the NewRow, ResizeColumns and RemoveRow methods.

This. :mrgreen:

Maybe those function are from a wrapper?
CrazyEddie: "I don't like GUIs"

sudhakar
Just popping in
Just popping in
Posts: 17
Joined: Wed Dec 21, 2011 16:46

Re: List box issue

Postby sudhakar » Wed Mar 12, 2014 08:07

yes. those are from wrapper class of MultiColumn list box.

for eg: NewRow() means m_pList->addRow(); where m_pList is CEGUI::MultiColumnList * m_pList;
they are working fine.

but in a column, if the text is too long for a ROW ,so some of the text is visually truncated
under the screen. I want to display such long text in a new row (the rest of the string) or
at least i would like to add a horizontal scroll bar to the list box so that the user can scroll right to see the complete text/string in that row.

please let me know how to achieve this.

Appreciate your help.

Thanks,
Sudhakar

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

Re: List box issue

Postby Ident » Wed Mar 12, 2014 10:15

Can you send a screenshot?

I think you got to do it manually because this is not a bug and CEGUI cannot know what you wanna do and how you wanna do it.
CrazyEddie: "I don't like GUIs"

sudhakar
Just popping in
Just popping in
Posts: 17
Joined: Wed Dec 21, 2011 16:46

Re: List box issue

Postby sudhakar » Wed Mar 12, 2014 11:00

could you please let me know how and where to attach a screen shot in the reply here.

i tried to paste my screen shot in Img tags here.but it seems not working.

Thanks,
Sudhakar

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

Re: List box issue

Postby Ident » Wed Mar 12, 2014 11:04

With the IMG tags. Upload it to a webhost first.
CrazyEddie: "I don't like GUIs"

sudhakar
Just popping in
Just popping in
Posts: 17
Joined: Wed Dec 21, 2011 16:46

Re: List box issue

Postby sudhakar » Wed Mar 12, 2014 11:10

i am not sure which web host to use. is there anyway to directly attach the screen shot.

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

Re: List box issue

Postby Ident » Wed Mar 12, 2014 11:18

No.
CrazyEddie: "I don't like GUIs"

sudhakar
Just popping in
Just popping in
Posts: 17
Joined: Wed Dec 21, 2011 16:46

Re: List box issue

Postby sudhakar » Wed Mar 12, 2014 11:58

could you please let me know if there are any webhosts

that people will generally use to post screen shots.

Thanks.

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

Re: List box issue

Postby Ident » Wed Mar 12, 2014 12:04

Are you not able find this out yourself with a simple web search? This is a CEGUI support forum and we won't recommend you any webhosts or image uploaders or advise you on how to use phpbb, sorry.
CrazyEddie: "I don't like GUIs"

sudhakar
Just popping in
Just popping in
Posts: 17
Joined: Wed Dec 21, 2011 16:46

Re: List box issue

Postby sudhakar » Wed Mar 12, 2014 12:59

okay. it seems i can not upload the image as i should not do that from third party web hosts

But i can explain the my problem/scenario in detail .please help me with any ideas and suggestions.

My scenario is I have a multi-column list box .I have two columns. in second column i am adding text dynamically in a row.
sometimes the text will be very long and it reaches the right border (vertical) of the list box and not able see some part of the text
at the right most side.

so my understanding is if we can provide some horizontal scroll bar ,the user can scroll right to see the text.

or can we make the long text to wrap and display below the current row.

I am not sure how to do this . Please let me know how to implement this if you have any idea .

I tried the following in layout xml for the multi-column list box but did not work.


Code: Select all


<Window Type="ABCLook/MultiColumnListNoTitle" Name="List" >
            <Property Name="MouseCursorImage" Value="set:WindowsLook image:MouseArrow" />
            <Property Name="UnifiedAreaRect" Value="{{0.006476,0.000000},{0.062848,0.000000},{0.985,0.000000},{0.889931,0.000000}}" />
            <Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" />

<AutoWindow NameSuffix="__auto_hscrollbar__">
          <Property Name="Font" Value="OpenSans-8" />
          <AutoWindow NameSuffix="__auto_thumb__">
            <Property Name="Font" Value="OpenSans-8" />
          </AutoWindow>
          <AutoWindow NameSuffix="__auto_decbtn__">
            <Property Name="Font" Value="OpenSans-8" />
          </AutoWindow>
          <AutoWindow NameSuffix="__auto_incbtn__">
            <Property Name="Font" Value="OpenSans-8" />     
         </AutoWindow>
  </AutoWindow>
    </Window>






Thanks,
Sudhakar

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

Re: List box issue

Postby Ident » Wed Mar 12, 2014 13:06

Nobody said you should not use third party web hosts. Nobody said that. Ever. We use third party hosts for that all the time in all posts.

Would this help you? viewtopic.php?f=10&t=3005
CrazyEddie: "I don't like GUIs"

sudhakar
Just popping in
Just popping in
Posts: 17
Joined: Wed Dec 21, 2011 16:46

Re: List box issue

Postby sudhakar » Wed Mar 12, 2014 13:56

is there anyway that i can add horizontal scroll bar to the multi-cplumn list box
i have tried by adding the auto_hscrollbar in layout xml as shown in the my previous post. but it is not working.
do i need to do anything else here for horizantal scrollbar for list box ?

I've gone thru the link you provided but it seems it is not suitable to my situation.

Thanks,
Sudhakar


Return to “Help”

Who is online

Users browsing this forum: No registered users and 8 guests