Page 1 of 1

Usage of List box

Posted: Wed Feb 16, 2005 07:07
by ritz
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

Re: Usage of List box

Posted: Wed Feb 16, 2005 09:46
by CrazyEddie
Hi,

Set the 'Clipped by parent' option to false:

Code: Select all

myList->setClippedByParent(false);


HTH

CE.

Re: Usage of List box

Posted: Wed Feb 16, 2005 11:12
by ritz
Thanks a Lot.
Ritz :D

Re: Usage of List box

Posted: Tue Feb 22, 2005 12:23
by ritz
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

Re: Usage of List box

Posted: Tue Feb 22, 2005 19:32
by CrazyEddie
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.