More than 128 object on a dialog

More than 128 object on a dialog

Postby Piscicelli Zingoni » Thu Dec 22, 2005 12:16 pm

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

Is it a limit of FWH ?

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

Postby Antonio Linares » Thu Dec 22, 2005 12:29 pm

Piscicelli,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Piscicelli Zingoni » Thu Dec 22, 2005 12:30 pm

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

Postby Antonio Linares » Thu Dec 22, 2005 1:06 pm

Piscicelli,

Here you have a working sample using 150 controls:

Code: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Piscicelli Zingoni » Fri Dec 23, 2005 2:21 am

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
Piscicelli Zingoni
 
Posts: 76
Joined: Wed Oct 12, 2005 5:52 pm
Location: Milan,Italy

Postby Antonio Linares » Fri Dec 23, 2005 5:48 am

Pisicelli,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Piscicelli Zingoni » Fri Dec 23, 2005 11:47 am

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
Piscicelli Zingoni
 
Posts: 76
Joined: Wed Oct 12, 2005 5:52 pm
Location: Milan,Italy

Postby Antonio Linares » Fri Dec 23, 2005 12:37 pm

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Piscicelli Zingoni » Fri Dec 23, 2005 8:21 pm

Ops!
It is time i go on holiday.
Sorry
Tks
Piscicelli Zingoni
 
Posts: 76
Joined: Wed Oct 12, 2005 5:52 pm
Location: Milan,Italy

Postby Antonio Linares » Fri Dec 23, 2005 8:42 pm

You are welcome, no problem :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 85 guests