Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » how to get fewer handles
how to get fewer handles [message #454171] Mon, 18 April 2005 18:26 Go to next message
Eclipse UserFriend
Originally posted by: groovynfunky.gmx.net

Hi!

I have a standalone SWT app, which creates a huge number of Controls in
certain scenarios. Since they are mostly Labels or tiny Canvas this even
makes sense for the user. Unfortunately I run out of handles on my Windows
machine.

Is there some way to minimize the number of handles used? Some sort of
SWT.VIRTUAL maybe? Most of the Controls are not on screen, so they don't
need a handle at that time.

Thank you, bye,
Michael
Re: how to get fewer handles [message #454195 is a reply to message #454171] Mon, 18 April 2005 22:12 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
How many controls are you creating?

"Michael Kerbel" <groovynfunky@gmx.net> wrote in message
news:85fe92ee0212bcccce33a37b6e93bb66$1@www.eclipse.org...
> Hi!
>
> I have a standalone SWT app, which creates a huge number of Controls in
> certain scenarios. Since they are mostly Labels or tiny Canvas this even
> makes sense for the user. Unfortunately I run out of handles on my Windows
> machine.
>
> Is there some way to minimize the number of handles used? Some sort of
> SWT.VIRTUAL maybe? Most of the Controls are not on screen, so they don't
> need a handle at that time.
>
> Thank you, bye,
> Michael
>
Re: how to get fewer handles [message #454211 is a reply to message #454195] Tue, 19 April 2005 07:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: groovynfunky.gmx.net

I try to create about 10000 Controls (mostly labels or Composites), but
the limit on my xp is apparently about 5000.

Am I mad to try something like this? Is the only workaround to draw
everything onto a Canvas and do everything by hand?

Thanks for your time,
Michael


Steve Northover wrote:

> How many controls are you creating?

> "Michael Kerbel" <groovynfunky@gmx.net> wrote in message
> news:85fe92ee0212bcccce33a37b6e93bb66$1@www.eclipse.org...
>> Hi!
>>
>> I have a standalone SWT app, which creates a huge number of Controls in
>> certain scenarios. Since they are mostly Labels or tiny Canvas this even
>> makes sense for the user. Unfortunately I run out of handles on my Windows
>> machine.
>>
>> Is there some way to minimize the number of handles used? Some sort of
>> SWT.VIRTUAL maybe? Most of the Controls are not on screen, so they don't
>> need a handle at that time.
>>
>> Thank you, bye,
>> Michael
>>
Re: how to get fewer handles [message #454227 is a reply to message #454211] Tue, 19 April 2005 13:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Why so many? The user would never be able to distinquish 10000 different
controls. They should be there only if the user can see them. If they
aren't on screen, don't create them until they are on screen.

Is this a big window that is to be scrolled into view? Or is it a series
of windows, like a wizard, which will be brought into view as needed?


--
Thanks,
Rich Kulp
Re: how to get fewer handles [message #454291 is a reply to message #454227] Tue, 19 April 2005 18:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: groovynfunky.gmx.net

Well, actually it's some sort of a Table. Only nicer, with mostly Labels,
generated graphics, ColumnLayout and stuff.

You are completely right about the user not seeing them at a time. It's a
big scrollable window. My question was about how to create the Controls on
demand, i.e. when they are scrolled into view. Or any other solution of
course :)

I also tried the while thing with a native Table, using TableEditors for
the graphics. This made it fairly ugly and hard to code, but it seemed
that I run into the same problem, only later: Each TableEditor needs a
handle. I guess I failed to correctly set up the SWT.VIRTUAL mode for that
Table.

So back to the problem. Can you give me a hint about how to create my
Controls "onScroll"?

Thank you, bye,
Michael
Re: how to get fewer handles [message #454298 is a reply to message #454291] Tue, 19 April 2005 21:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

I presume you are a subclass of composite and using scrollbars. I've
done something similar, but I didn't use controls as children, I drew
directly on the Canvas images.

You can still do this with controls by using the scrollbars, listening
for the scroll, and setting up controls that will be on this page that
is about to scroll into view.

The best would be if you could reuse the set of controls for a page and
simply change their contents for whatever items are on display on the
current page. Then you don't actually need to physically scroll anything
or dispose and create a bunch of controls each time you scroll.

--
Thanks,
Rich Kulp
Re: how to get fewer handles [message #454305 is a reply to message #454298] Tue, 19 April 2005 21:55 Go to previous message
Eclipse UserFriend
Originally posted by: groovynfunky.gmx.net

Thank you for your help. Sounds tricky but I will try it. If I get it
done, it should solve my problem.

Bye,
Michael
Previous Topic:How to make the Jface dialog resizable?
Next Topic:test
Goto Forum:
  


Current Time: Thu Apr 18 18:35:20 GMT 2024

Powered by FUDForum. Page generated in 0.01721 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top