More than 128 object on a dialog

Post Reply
Piscicelli Zingoni
Posts: 76
Joined: Wed Oct 12, 2005 5:52 pm
Location: Milan,Italy

More than 128 object on a dialog

Post by Piscicelli Zingoni »

Hi,
I need to create a single dialog with more than 128 object, i CANNOT use folders.

Is it a limit of FWH ?

Tks
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Piscicelli,

Do you create it from source code or from resources ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Piscicelli Zingoni
Posts: 76
Joined: Wed Oct 12, 2005 5:52 pm
Location: Milan,Italy

Post by Piscicelli Zingoni »

From source
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Piscicelli,

Here you have a working sample using 150 controls:

Code: Select all

#include "FiveWin.ch"

function Main()

   local oDlg, n, aValues := Array( 150 )
   local nRow, nCol
   
   for n = 1 to Len( aValues )
      aValues[ n ] = Str( n, 3 )
   next    

   DEFINE DIALOG oDlg TITLE "More than 128 controls" FROM 2, 2 TO 30, 48

   n = 1
   for nRow = 1 to 15
      for nCol = 1 to 10
          TGet():New( nRow - 0.5, nCol * 2 - 0.7, GenBlock( aValues, n++ ) )
      next
   next   

   ACTIVATE DIALOG oDlg CENTERED

return nil

function GenBlock( aValues, n )
 
return bSETGET( aValues[ n ] )
This is how it looks:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
Piscicelli Zingoni
Posts: 76
Joined: Wed Oct 12, 2005 5:52 pm
Location: Milan,Italy

Post by Piscicelli Zingoni »

Great !
So there is no limit ?
I can put on a single dialog 500 BUTTON to indicate the rooms of an hotel ?

I will try.

Many tks
Hi
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Pisicelli,

Yes, no limit. You can put 500 controls or more. As much as you need :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Piscicelli Zingoni
Posts: 76
Joined: Wed Oct 12, 2005 5:52 pm
Location: Milan,Italy

Post by Piscicelli Zingoni »

Try this:
Code:
#include "FiveWin.ch"

function Main()

local oDlg, n, aValues := Array( 150 )
local nRow, nCol

for n = 1 to Len( aValues )
aValues[ n ] = Str( n, 3 )
next

DEFINE DIALOG oDlg TITLE "More than 128 controls" FROM 0, 2 TO 35, 90

n = 1
for nRow = 1 to 20
for nCol = 1 to 15
bsave := ERRORBLOCK( { |x| BREAK(x)} )
BEGIN SEQUENCE
TGet():New( nRow - 0.5, nCol * 2 - 0.7, GenBlock( aValues, n++ ) )
RECOVER USING objError
msginfo("This is my Limit: "+str(n))
quit
END
ERRORBLOCK(bsave) // Restore handler
next
next

ACTIVATE DIALOG oDlg CENTERED

return nil

function GenBlock( aValues, n )

return bSETGET( aValues[ n ] )


I Got a messare of 152 max limit (under W98se /XP)

Hi
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Piscicelli,

You have to increase the aValues size, thats all:

local oDlg, n, aValues := Array( 300 )

It works ok :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Piscicelli Zingoni
Posts: 76
Joined: Wed Oct 12, 2005 5:52 pm
Location: Milan,Italy

Post by Piscicelli Zingoni »

Ops!
It is time i go on holiday.
Sorry
Tks
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

You are welcome, no problem :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply