Page 1 of 1

PostPosted: Sun Feb 19, 2006 1:20 pm
by tonyhunterajh

The following code works great in POSE, but not on my Tungsten|E; it displays very quickly then disappers! My POSE is running a 4.0 version of PalmOS emulating an M505. Cany anyone help me with this?


Code: Select all

  // Create a draw object and attach it to the form.
  Draw draw;
  // Draw the results headers.
  draw.rect(clrBG, 0, 95, 160, 106, 0);
  draw.text(clrFG, 30, 95, "       Travel Time Results       ");;
  draw.text(clrFG, 0, 107, "    Yrs     Mth     Dys      Hrs      Min    Sec");
  // Load the main form.

PostPosted: Sun Feb 19, 2006 3:30 pm
by tthkbw
You can't draw on mainform and then load it--it will redraw the form. Your drawing is probably happening on whatever the current form is(perhaps mainform), but when you load mainform, it overwrites your drawing. Put your code in mainform.draw(), or try just not doing the mainform.load() if you're already in mainform.

Terry Brown

PostPosted: Sun Feb 19, 2006 3:54 pm
by tonyhunterajh
Yep, I created an ondraw handler for the form and put the draw code inside it - works like a dream!