bitmaps inside a form

A PocketC native palm library offering native forms and assorted utilities

Postby auzan00 on Mon Jan 14, 2002 12:14 pm

How can I display a bitmap in a form ?

I tried this :

Form (FORM1,"RESTAURANT");
... buttons and labels definitions...
OpenBmpDb ("garcon");
FastBmp (0,15,0);
Fctl (DRAW,FORM1);

but I end up with the bitmap shown for 1 second and then the buttons and labels.

How can I have the bitmap inside the form ?

Thanks.
auzan00
 
Posts: 20
Joined: Fri Oct 26, 2001 10:19 am
Location: France

Postby jstadolnik on Mon Jan 14, 2002 2:01 pm

Bitmaps are not form objects. They are not installed in the forms. Thus when you do the DRAW command the forms object will draw over any graphics already drawn. That is why the bitmap disappears on you.

You need to draw the bitmap after you call the DRAW command.

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby auzan00 on Tue Jan 15, 2002 8:17 am

Thanks for your answer. I tried to move the OpenBmpDb and FastBmp statements, and I also changed for the 7.1.5 version of the lib.

Now, it crashes at the OpenBmpDb (it didn't with the 7.1 version : I could see the bitmap flash before and after the form was displayed).

Here is the code :

Form (FORM1,"RESTAURANT");
... some buttons and labels definitions...
Fctl (DRAW,FORM1);
puts ("lecture : "); ---> this one is diplayed
OpenBmpDb ("garcon");
puts ("OK\n"); --> not that one !!
FastBmp (0,15,0);


What's wrong ? I didn't change the image file so the problem doesn't come from the "garcon.prc" file.

Fabrice
auzan00
 
Posts: 20
Joined: Fri Oct 26, 2001 10:19 am
Location: France

Postby jstadolnik on Tue Jan 15, 2002 4:01 pm

Version 7.1.6 is now available with the OpenBmpDb fix.

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA


Return to Pocket Toolbox

Who is online

Users browsing this forum: No registered users and 3 guests

cron