method to building a screen with many objects

This forum is for eXpress++ general support.
Message
Author
Maxz
Posts: 49
Joined: Sun Jan 09, 2022 12:11 pm

method to building a screen with many objects

#1 Post by Maxz »

what is the elegant method to build a screen full of GETs, TABPAGES, ecc. and avoid the sequential display (slow refresh) of the objects that you are populating ?

it would be possible to display an hourglass or a bitmap like 'wait...' in center of the drawingarea that hides the preparation of everything ?
it is terrible to show the composition of a screen piece by piece

max

User avatar
Auge_Ohr
Posts: 1419
Joined: Wed Feb 24, 2010 3:44 pm

Re: method to building a screen with many objects

#2 Post by Auge_Ohr »

hi Max,

every Xb-Part have Parameter <lVisible> at New() / Create() which is DEFAULT .T.

use Dialog with .F. and when all finsh "just" oDialog:Show()
remember to "fill" Listbox() ComboBox() or "Browse" before "Show" Dialog

p.s. opposite of o:Show() is o:Hide()
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4745
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: method to building a screen with many objects

#3 Post by rdonnay »

Code: Select all

DCGETOPTIONS ;
  BUSYMESSAGE 'Building Screen Objects. Please wait..'   COLOR GRA_CLR_DARKGREEN  
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1185
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: method to building a screen with many objects

#4 Post by Tom »

Take a look at DC_MergeGetlists(), which still is a good way to create objects on tabpages only if they are needed.

Jimmy ("Auge_ohr") doesn't use eXpress++, so forget what he mentions here.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Maxz
Posts: 49
Joined: Sun Jan 09, 2022 12:11 pm

Re: method to building a screen with many objects

#5 Post by Maxz »

I solved the problem by creating the dialog window with Visible = .F. and after building all GETs, TABPAGE, etc. i used:

DCGETOPTIONS EVAL {||dialog:show()}

If I've more time I will try Tom's solution using DC_MergeGetlists(), which sould be more efficient


Thanks to all for the help

skiman
Posts: 1194
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: method to building a screen with many objects

#6 Post by skiman »

Hi Maxz,

Just wondering how many objects you have in a screen? It looks as you are concerned about speed, while I never had issues with it in 'normal' screens in my application.

When using tabpages, you only create the objects if that tabpages gets focus. WIth DC_MergeGetlists you add the new tab-content to the getlist.

Since a few months there is also a modification in eXpress++ so 'non-visible' objects are not refreshed with a dc_getrefresh(). Also with dc_getrefresh() you can define which objects needs to be refreshed. In a lot of cases you don't need to refresh everything.

See the sample in XDemo - Sample program 5 - MergeGets 2.
Best regards,

Chris.
www.aboservice.be

User avatar
Auge_Ohr
Posts: 1419
Joined: Wed Feb 24, 2010 3:44 pm

Re: method to building a screen with many objects

#7 Post by Auge_Ohr »

hi Tom,

to "hide" Control when build Screen is not only for Xbase++ / Express++ :naughty:
it is for all GUI Apps while "paint" Control need much Time.

Marx is a new User and he should know what Xbase++ Original "can do"
Express++ is based on Xbase++ so all what Xbase++ "can do" will work with Express++

i agree that Express++ have many Things which are more "Powerfull"
as Marx have a Express++ License (?) he should use it.
greetings by OHR
Jimmy

User avatar
Tom
Posts: 1185
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: method to building a screen with many objects

#8 Post by Tom »

Hi, Jimmy.

The HIDE clause does that for eXpress++-users. It just maybe confusing to talk about object properties while this is wrapped by the tool used here. Besides, object properties can and should be used although they are created with eXpress++!

Anyway, hiding objects does not improve the speed of building a dialog.

Maxz: There is a HIDE option in DCGET OPTIONS, which does that for you. You don't need to set an o:Visible := .F. at every object.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Maxz
Posts: 49
Joined: Sun Jan 09, 2022 12:11 pm

Re: method to building a screen with many objects

#9 Post by Maxz »

Yes Tom, I understood your suggestion perfectly but my quick and acceptable solution was this:

- I create always an XbpDialog (oDialog) to generate the screen where to build the GETs [ XbpDialog():New(oMainWindow, , aPos, aSize, , .F. ) ]
- only this part is in :hide() state during the process of population of the GETs
- all GETs are parent of oDialog
- when the DCREAD GUI loop starts I put the dialog box in :Show() state

The result is that the user waits 1 or 2 seconds and the screen appears complete with everything

for me this is already a success!! - What do you think?

ps. maybe it would be better if I did an intensive course with you ... :D

Maxz
Posts: 49
Joined: Sun Jan 09, 2022 12:11 pm

Re: method to building a screen with many objects

#10 Post by Maxz »

Tom, I would like to experiment with your suggestion for creating screens as the user tries to access a TABPAGE
if I understand correctly, the technique is to populate the next TABPAGE only when the object is made active his focus, right ?

for example:
@ 0,0 DCTABPAGE oTabPage2 CAPTION 'tabpage2' ;
RELATIVE oTabPage1 ;
GOTFOCUS {||PreparePage2()}

@ 0,0 DCTABPAGE oTabPage3 CAPTION 'tabpage3' ;
RELATIVE oTabPage2 ;
GOTFOCUS {||PreparePage3()}

within the PreparePageN() routine it is sufficient to create the GETs and use DC_MergeGetlists ?

Post Reply