method to repaint the contents of windows

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

method to repaint the contents of windows

#1 Post by Maxz »

when I open 1 or 2 sublevels of DCREAD and try to minimize the screen and restore it, I can not refresh the contents completely
repaint_error.jpg
repaint_error.jpg (26.63 KiB) Viewed 2864 times

I attach an example to better explain what happens
test1.zip
(63.27 KiB) Downloaded 190 times
is it possible to force a correct :configure() - :paint() or other instructions to redraw all when the window maximizes ?

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

Re: method to repaint the contents of windows

#2 Post by Maxz »

is it possible to use something similar to GraSaveScreen() of parent window to save the previous state and restore it into :drawingarea when when changing the state of the window (from XBPDLG_FRAMESTAT_MINIMIZED to XBPDLG_FRAMESTAT_NORMALIZED) ?

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

Re: method to repaint the contents of windows

#3 Post by Tom »

Hi, Maxz.
is it possible to use something similar to GraSaveScreen()
This would be like trying to use a photo of your car to drive somewhere instead of using the car itself. GraSaveScreen() is used to create a screenshot, not a usable dialog copy.

I don't know exactly what you're trying to do here, but you should know that the best way to deal with several dialogs is to have a DCREAD GUI for every single dialog, no matter whether it's modal or not. If you want to deal with several GetLists, use DCREAD GUI EXIT SAVE and then merge the GetLists. Otherwise, there is not GetList to be refreshed. The GetList is populated by DCREAD.
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 repaint the contents of windows

#4 Post by Maxz »

Tom
i have to give you reason (as always)
but unfortunately I still do not understand the philosophy of the Express library (and I'm inventing them thinking procedural and not GUI)

I am always convinced that every new dialogue must have its own GetList and its own loop of events (dcread)
but if I need to run a new subprogram (for example, when I press a button to perform an action or enter a detail of a line of the browse), I imagine creating a new dialog with a new GetList (independent respect the previous) and a new loop (dcread) in modal type.
leaving this loop I would like to return to the previous level of the dialog coming out of this loop I would like to return to the previous level of dialogue.

in the example I uploaded, there is the main dcread and then 2 nested subfunctions each with its own GetList and DCREAD to understand how to go deep.
the user who is in that level of event loops must not be able to access the previous ones of course

I do not understand why you suggest me to merge the GetList using SAVE clause (but maybe it's me who doesn't understand well)

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

Re: method to repaint the contents of windows

#5 Post by Tom »

Hi, Maxz.

Maybe running the new dialogs in different threads will be the solution for your approach.
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 repaint the contents of windows

#6 Post by Maxz »

I modified the example using the merge of the GetList as suggested by Tom
test1.zip
(62.93 KiB) Downloaded 188 times
I had to use the MULTILISTS clause otherwise the GetOptions didn't work well on all the sublevels

in this example there are some problems that I can not fix, for example:
- the ability to use the ESC key to close a sublevel and return to the previous one (works only in the initial level)
- if I enable the confirm clause, when I press enter in the last field in the sublevels, I also exit from initial level
- the management of the buttons related to each sublevel is difficult to achieve because you have to turn off / on those related to the correct level

Post Reply