maximum no of gadgets?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by searhin.

hi there,

i wonder if there is a limit to the number of gadgets which can be implemented into a single window (or programme)?

a programme i am writing requires a window with about 30 gadgets (of all types: panels, trees, listiconviews, strings, buttons and checkboxes, text). now, i always get an compiler error (without text message) when the number of gadgets becomes a little more than 20.

however, i can "inactivate" some gadgets by ";" and the programme is doing fine. in fact, i tested every gadget this way and all are functionally and their own. only the number of gadgets seems to lead to an error.

is there anybody who can help??
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

I have one apps here that I did in PB and it has 72 gadgets on the main window and another with 66 gadgets on the main window... with no problems at all.

Maybe you have the incorrect syntax for one of your gadgets which is causing problems, maybe using a handle somewhere when you should be using PB number? If you posted your code we could probably help you a lot better.

Visit the PB Resources Site at http://www.reelmediaproductions.com/pb
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> i always get an compiler error (without text message) when the
> number of gadgets becomes a little more than 20.

This sounds suspiciously like an older version of PureBasic, or even
the demo, which is using the InitGadget command... are you using the
latest version of PureBasic (v3.30) and are you a registered user?


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Berikco.

The number of gadgets (if not limited by Purebasic) depends on the systemresources of Windows, and not the amount of RAM in the PC.
Because you can see every Gadget as a little window managed by the OS.
NT/W2K/XP can manage much more gadgets as Win9X.
I believe in Win9x it is limited to 32767, for all applications, including the windows explorer.
In NT/W2K/XP much more, M$ guy told we once...but i forgot. :)

In Win3.1, it whas much less, if you had to much icons on the desktop, they colored black

Regards,

Benny

http://www.benny.zeb.be
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by searhin.

thank you all for answering!!

i posted my code in the german mailing list and two guys tested it successfully.

@Benny: interesting. these numbers of possible gadgets should by enough for my project :wink: maybe i could include a some thousand buttons more :))

@PB: right, i am still using the demo (waiting for the registration for more than a week now...*sigh*). however, compiling my programme did not give a "restricted to about 200 lines" error message (which i also got), but another error type without text message.

thanx again,
searhin
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by searhin.

thank you all for answering!!

i posted my code in the german mailing list and two guys tested it successfully.

@Benny: interesting. these numbers of possible gadgets should by enough for my project :wink: maybe i could include a some thousand buttons more :))

@PB: right, i am still using the demo (waiting for the registration for more than a week now...*sigh*). however, compiling my programme did not give a "restricted to about 200 lines" error message (which i also got), but another error type without text message.

thanx again,
searhin
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.
Originally posted by searhin
(waiting for the registration for more than a week now...*sigh*).
Please send me a mail at [url]mailto:fred@purebasic.com[/url] to get it ASAP (put your name and personnal information withon it).

Fred - AlphaSND
Post Reply