Usage of List box

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

User avatar
ritz
Quite a regular
Quite a regular
Posts: 49
Joined: Wed Jan 12, 2005 12:06

Usage of List box

Postby ritz » Wed Feb 16, 2005 07:07

Hello CE,

I am creating calendar widget using your library.
UI of my widget is similar to Microsoft Outlook Express Calendar GUI.

I need to show a list box on click of button above the month display area.

My problem is as per GUI list drawing area goes outside of the parent window area.so list is not getting displayed fully.

I have attached the snap shot for the required GUI.

Is their any way by which i can use standard list control to draw outside it's parent window.

I have attached the snap shot displaying parent window area with red boundary.

"Will modifying Original code for clipper calculation help?"

rgds,
Ritz

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Usage of List box

Postby CrazyEddie » Wed Feb 16, 2005 09:46

Hi,

Set the 'Clipped by parent' option to false:

Code: Select all

myList->setClippedByParent(false);


HTH

CE.

User avatar
ritz
Quite a regular
Quite a regular
Posts: 49
Joined: Wed Jan 12, 2005 12:06

Re: Usage of List box

Postby ritz » Wed Feb 16, 2005 11:12

Thanks a Lot.
Ritz :D

User avatar
ritz
Quite a regular
Quite a regular
Posts: 49
Joined: Wed Jan 12, 2005 12:06

Re: Usage of List box

Postby ritz » Tue Feb 22, 2005 12:23

Hi

I am facing one more issue in implementing the feature discussed above. can nay body please help me out in resolving the issue.

Here is the snap shot.


In this case the list box does not draw beyond the application main window. In order to show the list completely. I need to know that it will not fit in the root window drawing area.

Is their any function which can tell this.

rgds,
Ritz

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Usage of List box

Postby CrazyEddie » Tue Feb 22, 2005 19:32

One way to do this would be to get the screen area rect of the listbox, get the screen area rect of the window you wish to test against (or the screen itself), get the intersection of these two rects and compare this result against the original Listbox rect. If the intersection rect is equal to the Listbox rect, then the listbox is entirely on-screen, else the difference(s) on each edge will tell you by how much to need to adjust the Listbox position to ensure that it is completely visible.

HTH

CE.


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest