Repaint static / bitmap
Repaint static / bitmap
Hello,
Attached you find a small test program.
It can paint in different colours on a background bitmap.
If another window is moved over the painted part, and removed, the painted colours disapear.
Then i press the "Repaint" button, an the data is back.
How can i prevent that my painted data is removed in the first place?
Regards,
Jack Duijf
Attached you find a small test program.
It can paint in different colours on a background bitmap.
If another window is moved over the painted part, and removed, the painted colours disapear.
Then i press the "Repaint" button, an the data is back.
How can i prevent that my painted data is removed in the first place?
Regards,
Jack Duijf
- Attachments
-
- Paint_Express.zip
- Paint sample in express
- (150.87 KiB) Downloaded 935 times
Regards,
Jack Duijf
Jack Duijf
Re: Repaint static / bitmap
in xbpDrawStatic() Class you are "painting" on a Presentationspace().jdsoft wrote:If another window is moved over the painted part, and removed, the painted colours disapear.
Then i press the "Repaint" button, an the data is back.
How can i prevent that my painted data is removed in the first place?
you need a :draw() Callback Methode to call Methode xbpDrawStatic:Repaint()
Code: Select all
LOCAL oDraw := xbpDrawStatic():New(,,{0,40},{500,300})
...
oDraw:draw({|| oDraw:Repaint() }
greetings by OHR
Jimmy
Jimmy
Re: Repaint static / bitmap
Hello Auge,
I dis as you suggested:
I changed 1 line of code, notice the EVAL:
Unfortunaly it was not succesful.
What is my mistake?
Regards,
Jack Duijf
I dis as you suggested:
I changed 1 line of code, notice the EVAL:
Code: Select all
@ 0,0 DCSTATIC TYPE XBPSTATIC_TYPE_RAISEDBOX SIZE 60,12 OBJECT oFoto PARENT oStatic SUBCLASS "xbpDrawStatic()" EVAL {|o|o:Draw({||oFoto:Repaint()})}
What is my mistake?
Regards,
Jack Duijf
Regards,
Jack Duijf
Jack Duijf
Re: Repaint static / bitmap
i´m not a Express User ...jdsoft wrote:Code: Select all
@ 0,0 DCSTATIC TYPE XBPSTATIC_TYPE_RAISEDBOX SIZE 60,12 OBJECT oFoto PARENT oStatic SUBCLASS "xbpDrawStatic()" EVAL {|o|o:Draw({||oFoto:Repaint()})}
not shure what you want to do ... did you want to "show" a Bitmap ( oFoto ) on a Static ?
if yes use oStatic:setCaption(oFoto) with oStatic:type := XBPSTATIC_TYPE_BITMAP
Class xbpDrawStatic is to "draw" Bitmap (into PresentationSpace), you do not need
to :draw it (into PresentationSpace) to "show" a Bitmap.
hm ... is o = oFoto ?EVAL {|o|o:Draw({||oFoto:Repaint()}}
greetings by OHR
Jimmy
Jimmy
Re: Repaint static / bitmap
Jack -
I don't understand your test app at all.
First of all, it wouldn't compile unless I commented out all references to sy_wintoolbox.*.
Then it fails on DC_ReadModal().
Why would you be calling DC_ReadModal() instead of DCREAD GUI?
Roger
I don't understand your test app at all.
First of all, it wouldn't compile unless I commented out all references to sy_wintoolbox.*.
Then it fails on DC_ReadModal().
Why would you be calling DC_ReadModal() instead of DCREAD GUI?
Roger
The eXpress train is coming - and it has more cars.
Re: Repaint static / bitmap
Hello Roger,
My mistake.
Please remove #include "Sy_WinToolbox.ch" from Appcons.ch
Please remove "Sy_WinToolbox.LIB" from project.xpj
Replace Dc_ReadModal(...) to DCREAD GUI FIT
Then all does compile with no problem.
Do you have teamviewer?
I can show you my problem.
Regards,
Jack Duijf
My mistake.
Please remove #include "Sy_WinToolbox.ch" from Appcons.ch
Please remove "Sy_WinToolbox.LIB" from project.xpj
Replace Dc_ReadModal(...) to DCREAD GUI FIT
Then all does compile with no problem.
Do you have teamviewer?
I can show you my problem.
Regards,
Jack Duijf
Regards,
Jack Duijf
Jack Duijf
Re: Repaint static / bitmap
Jack -
Yes, I do have TeamViewer.
Let me first see if I can reproduce the problem.
If not, I will contact you by Skype.
I was on the phone with Bobby Drakos when you Skyped me and didn't get a chance to respond.
I saw a Skype message popup with your name but then the window disappeared.
Roger
Yes, I do have TeamViewer.
Let me first see if I can reproduce the problem.
If not, I will contact you by Skype.
I was on the phone with Bobby Drakos when you Skyped me and didn't get a chance to respond.
I saw a Skype message popup with your name but then the window disappeared.
Roger
The eXpress train is coming - and it has more cars.
Re: Repaint static / bitmap
Hello Roger,
After some experimenting, i think i fixed the problem.
I added a xbpDrawStatic:HandleEvent()
It only is a "nervous" sccreen when repaint is done.
I can live with it.
Regards,
Jack Duijf
After some experimenting, i think i fixed the problem.
I added a xbpDrawStatic:HandleEvent()
It only is a "nervous" sccreen when repaint is done.
I can live with it.
Regards,
Jack Duijf
Code: Select all
Method xbpDrawStatic:HandleEvent(nEvent,mp1,mp2)
::DC_XbpStatic:HandleEvent(nEvent,@mp1,@mp2)
if nEvent == xbeP_Paint
::Repaint()
endif
Return SELF
Regards,
Jack Duijf
Jack Duijf
Re: Repaint static / bitmap
I tried that, but it makes the bitmap disappear and paints a black background.
The eXpress train is coming - and it has more cars.
Re: Repaint static / bitmap
Hello Roger,
Had the same problem, but now it's fixed.
Attached you find the working sample.
Regards,
Jack Duijf
P.s. Some time ago, you mentioned a webpage to present a Express++ program.
How about that?
Had the same problem, but now it's fixed.
Attached you find the working sample.
Regards,
Jack Duijf
P.s. Some time ago, you mentioned a webpage to present a Express++ program.
How about that?
- Attachments
-
- Paint_Express.zip
- (205.15 KiB) Downloaded 926 times
Regards,
Jack Duijf
Jack Duijf