How Many controls in a dialog ?

How Many controls in a dialog ?

Postby Silvio » Tue Mar 03, 2009 3:23 pm

How Many controls Xharbour/fivewin support in a dialog ?
I try with 50x30 =1500 controls is ok but is too slow to show all
If I try with 60x30 = 1800 controls xharbour/fivewin make an error
Application
===========
Path and name: C:\work\errori\ugo\edbeach.Exe (32 bits)
Size: 2,562,048 bytes
Time from start: 0 hours 0 mins 3 secs
Error occurred at: 03/03/09, 16:21:51
Error description: Error FiveWin/3 Cannot create Dialog Box:
Title: PLANNING SPIAGGIA

Stack Calls
===========
Called from: .\source\classes\DIALOG.PRG => CREATEDLGERROR(0)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: final.prg => EDITOR(95)



I have a AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ 24133 Mhz
with Hardware memory: 2048 megs


it is a bug ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: How Many controls in a dialog ?

Postby Antonio Linares » Sun Mar 08, 2009 8:39 am

Silvio,

Please consider that you don't need to create so many controls.

You can "paint" the bitmaps on a window (or dialog) and later on detect where the user click based on the mouse coordinates. This way the application will behave much faster (as it does not have to manage so many controls).
regards, saludos

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

Re: How Many controls in a dialog ?

Postby Silvio » Sun Mar 08, 2009 5:16 pm

Anotnio,
It is NO good for me
because I must change each Umbrellas( controls) with another bitmap
Sample if an umbrellas is ocupated the umbrellas is red instead is green

I have this problem :
Here some confiruation of beach the = are spaces and the X are umbrellas

First beach

x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x x x x x x

x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x x x x x x

x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x x x x x x

x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x x x x x x

x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x x x x x x



x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x x x x x x

x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x x x x x x



Another beach configuration

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x =



33 elements x 11 = 330


this is another beach chalet

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x = x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x = x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x = x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x = x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x = x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x = x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x = x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x = x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x = x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x = x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x = x x x x x x x x x =

= x x x x x x x x x x x x x x x = x x x x x x x x x x x x x x x = x x x x x x x x x =



I know also other chalet beachare many and many umbrellas ( 100x20)



I try with another application made with delphi language , also DAniel Gill saw the DElphi program , and on this there are 100x100 control in a a dialog, scroll vertical and Horizontal and the user can with the mouse click on center and move the window, it 'is funny why on fwh all these things are not possible ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: How Many controls in a dialog ?

Postby Otto » Sun Mar 08, 2009 6:11 pm

Hello Silvio,
Had you had a look on my video. I do it like Antonio said.
And you see that I click on an umbrella and change the bitmap.
You also see how I move the “umbrellas”.

http://www.pustertal-online.com/schirme/schirme.htm

I tried to insert 36*50 ( = 1800) umbrellas into the grid.
In the video you see the speed behavior.
I think speed is not so bad. You see how I edit a umbrella and
change the style.
Regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Re: How Many controls in a dialog ?

Postby Silvio » Mon Mar 09, 2009 12:53 am

Dear Otto,
I want use sbutton to change the bitmaps of each umbrellas : I want click on each control and show a menu popup for add or modify the reservation or show a tolltip with the number of umbrellas
I made allready this application but I need now to show the beach configuration I sad on my topic

I cannot use and not want use Grid , xbrowse,browse,tsbrowse and another type of it

If you'll see a delphi program you can understand What I mean.
look it please http://www.eustudio.eu/images/ombrellon ... niDEMO.exe
On first menu you can config the beach
try to insert 100 x100 and you can insert 10.000 element on a window
then you can see the beach and the application create 10.000 umbrellas
and you can move the window as a pdf click on any position with the mouse
it's a funny , try it please ....
Why it not is possible on fwh ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: How Many controls in a dialog ?

Postby Antonio Linares » Mon Mar 09, 2009 5:56 am

Silvio,

Otto's example is a very good one :-)

Also, are you the developer of that Delphi application ? If yes, why don't you just use that one ?

Please keep in mind that Delphi uses native code. It does not use a virtual machine like Harbour (and Clipper) so it will be faster for that kind of applications, where you have to manage a huge amount of objects.
regards, saludos

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

Re: How Many controls in a dialog ?

Postby Antonio Linares » Mon Mar 09, 2009 7:00 am

On many other circunstances, the use of a virtual machine is a great advantage (over Delphi, C++, C, etc) as the virtual machine produces very robust applications where there are no GPFs, there are controlled error logs, calls stack, etc.

For bussiness applications, a virtual machine is the way to go.
regards, saludos

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

Re: How Many controls in a dialog ?

Postby Silvio » Mon Mar 09, 2009 8:57 am

Antonio, Otto,

Perhaps U not understand me

I not sad Delphi the best instaed of Fwh !

I saw a control like window on a delphi application
this window have vertical and Horizontal scroll as fwh but
this window can have also 100x100 object and
this window can be move from use as a pdf object with the mouse

why before explain your mind not see the application I send the link ?

Daniel Gill saw the delphi appliation working and he Know What I mean!!

Otto's test can be good one but it not is the function I was trhinking and I must create

I must not create a planning or a gantt graphics function,

I not have to insert day or month or reservation but only bitmaps to simulate umbrellas, to simulate a beach

to create only an dbf

and I cannot believe absolutely all this cannot create on fwh or xharbour or harbour !!!!!!!!!!!!!!!
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: How Many controls in a dialog ?

Postby Silvio » Mon Mar 09, 2009 12:31 pm

I made this test

Now I can insert 100 umbrellas for 15 filas

Image

Otto, Antonio, if you see this perhaps you can understand what I mean

Now I can scroll vertical and Horizontal to see the other umbrellas at right of this dialog

CAN with the mouse click on any position of this dialog and move the dialog as I am pressing the vertical or horizontal scroll ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: How Many controls in a dialog ?

Postby Otto » Mon Mar 09, 2009 1:32 pm

Hello Silvio,
>Otto's test can be good one but it not is the function I was trhinking and I must create
Please explain what is missing.


You must abstract a little bit.

I think there is also no ready to use out of the box solution for your purpose. But with the technique Antonio explained you can manage this task easily.

Sure you don’t need days. In my case I need. I only wanted to demonstrate for you the high speed of Fivewin also if you have as I in this case 1800!!! bitmaps on screen.

Keep in mind that I don’t use a grid.

Please have a look at the sample pickdate - you Silvio gave the initial impulse to develop this class. There we use exactly the technique Antonio explained.

Insert only for test purpose an umbrella red for the pair days and an umbrella green for the unpair days, etc. With the on click event you start your combobox to select the umbrella status.
Code: Select all  Expand view
if   Day( dTmpDate )=2                
      ::SayBitmap( ::nTopStart + month(dTmpDate) * nRowStep + 1, nLeftCol, ::oBitmap, , 10 )            
elseif   Day( dTmpDate )=3  .or.  Day( dTmpDate )=5                                              
      ::SayBitmap( ::nTopStart + month(dTmpDate) * nRowStep + 1, nLeftCol, ::oBitmap2, , 10 )            

elseif   Day( dTmpDate )=8  .or.  Day( dTmpDate )=15                                              
      ::SayBitmap( ::nTopStart + month(dTmpDate) * nRowStep + 1, nLeftCol, ::oBitmap3, , 10 )    
else
::SayBitmap( ::nTopStart + month(dTmpDate) * nRowStep + 1, nLeftCol, ::oBitmap4, , 10 )            
endif    
   




Best regards,
Otto

PS: Silvio, please post back your improvements and changes.

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Re: How Many controls in a dialog ?

Postby Silvio » Tue Mar 10, 2009 1:01 am

PErhaps you not understand what I must create do you saw the link I post here ?

I not use calendar I not must show days

you see a calendar here ?

Image

and if I click on each umbrellas ( sbutton) i can open a menu pop where i can make a reservation


Image


Wh I must change all my application ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: How Many controls in a dialog ?

Postby Otto » Tue Mar 10, 2009 1:21 am

Hello Silvio,

> you see a calendar here ?

You must abstract a little bit.
I only showed you the way how to do.

Regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Re: How Many controls in a dialog ?

Postby Silvio » Tue Mar 10, 2009 1:32 am

But I made allready all application
I have 500 umbrellas now
I must increment the umbrellas numbers
why I must re-made all application ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: How Many controls in a dialog ?

Postby Silvio » Fri Jul 24, 2009 9:49 pm

RESOLVED !!!!!!!!!!!

With my TmapBeach class I can create over 6500 button on a dialog !!!!!!!!!

Incredible!!!!!!!!!!
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: How Many controls in a dialog ?

Postby Otto » Fri Jul 24, 2009 9:54 pm

Congratulation, Silvio. Do you have a demo-exe?
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 108 guests