Hello, there cud b different problems of settings.
U 'll have to use a combinatioon of some of these ...
FrmDrawForm
FrmEraseForm
FrmInitForm.
WinDrawBitmap
Look at the soln.s givien below..
Rest Best in Next
Abhijit.
[EMAIL PROTECTED] on 05/12/2000 05:38:09 PM
Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
cc: (bcc: Abhijit Mhetre/LTITLPUN)
Subject: Bitmap problems!
Hello,
This might be a very trivial question but it just isn't working the way it
should. So I desperately need help!!!
I have 9 form bitmaps on display which are initially invisible . I set them to
be visible only on a certain condition which i check during runtime. For this I
use the FrmShowObject and FrmHideObject APIs but the problem is that the display
does not get refreshed ie. when I scroll ,it could happen that the first record
after scrolling no longer satisfies the condition and hence I want the bitmap to
be made invisible but this does not happen.
Its but obvious, see, u need to redraw form. i.e.
use FrmDrawForm(); This redraws the objects with specified property.
You may have to call FrmInitForm(); just give a try.
The display is refreshed only when the form is loaded again by calling
FrmGotoForm. Could anyone tell me why?
This is bcoz, FrmGotoForm() function initializes form & draw it..
Also when i try to scroll back, i get the error - 'Object not in form' and i
have to reset.
The code goes something like this :
This error can be sort out by debugging the things,
Its quite sure that u r trying to trying to operate on the object which is not
the part of currently active form.
Just look at that, see, which form is active & which object u r trying to
operate on...
Logically, u may feel, ur code is perfect, but it may happen that, U might be
deleting the form & trying to oprate on scroll Bar.. cant say exactly whats
there.
Use FrmEraseForm() insted of FrmDeleteForm() if u wanna remove from from
display..
Dont use FrmGototForm() since in this case, u r deleting currently active form,
better use EraseForm..
Also, dont forget to set Form's Property "Save Backgroung" as True.
//code for setting all the form bitmaps invisible using FrmHideObject
FrmHideObject(); // done for bitmaps 1 to 9
for (n = 0; n <9 ; n ++)
{
if (<certain condition is true>)
{
FrmShowObject(......); //show the nth form bitmap
}
}
Also could someone tell me where i can find a sample showing the way to
dynamically generate a bitmap instead of creating 9 form bitmaps and 9 bitmap
resources to assign to them as I am having to do currently?
U can create dynamically many objects using,
FrmNewBitmap
This Creates a new form bitmap dynamically.
Prototype :-
FormBitmapType * FrmNewBitmap (VoidPtr *formPP,
const Word ID,
const Word rscID,
const Word x,
const Word y)
just look at this,
Now, all this r not exact solutions, but may u get some idea..
Thanx in advance!
Preeti Lovekar
Indus Software
India
______________________________________________________
123India.com - India's Premier Portal
Get your Free Email Account at http://www.123india.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/