[futurebasic] Window clipping problem

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1999 : Group Archive : Group : All Groups

From: pochas <pochas@...>
Date: Wed, 22 Sep 1999 03:11:31 -0400
Staz,  I appreciate your quick answer to the HANDANDHAND problem.  I've
already got the fix installed.  Below is some code that demonstrates a
window clipping problem when a window has scroll bars.  If you zoom the
window, the scroll bars look ok.  But when you click an edit field, the
fields overwrite the scroll bars.  Any advice, anyone?  I'll probably
try setting the clip region just before redrawing the edit fields, but
shouldn't this be automatic?
  Regards, Charles P.

LOCAL FN wndBuild
DIM n%, p%
WINDOW #5,"Clipping Demo",(5,40)-(560,340),_docZoom
FOR n% = 0 TO 31
  FOR p% = 0 TO 7
    EDIT FIELD 200 + 8 * n + p,"",( 13 + 66 * p, 13 * n)-(13 + 66 * p +
65, 13 * n + 12), _Framed
  NEXT
NEXT
SCROLL BUTTON  1,  1,  1,  19,  6,,_scrollVert
SCROLL BUTTON  2,  3,  0,  3,  3,,_scrollHorz
END FN

local fn wndCalc
dim n%
//  Reset clip region here???
for n% = 200 to 450
  edit$(n%) = "aaaaaa"
next
end fn

local fn doDialogs
evt% = dialog(0)
id% = dialog(evt%)
  select evt%
    case _efClick
      fn wndCalc
    case _wndClose
      end
  end select
end fn

on dialog fn doDialogs
fn wndBuild
fn wndCalc

do
  handleevents
until 0