[futurebasic] Re: [FB] I am so bad with coordinates

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : August 2004 : Group Archive : Group : All Groups

From: Jay Reeve <jayreeve@...>
Date: Fri, 27 Aug 2004 19:25:07 -0500
Brian,

We can't tell from this code whether your left, top, right, and bottom 
have anything to do with FieldRect. What you have should work if 
preceded with this:
DIM FieldRect;0 ,top%,left% ,bottom%,right%

In case you aren't familiar with this construction, the ";0" tells the 
compiler to assign no bytes to the var FieldRect, thereby causing it to 
have the same address as the var left.

Your code would also work if followed with this
SETRECT(FieldRect,left,top,right,bottom)
This sets the FieldRect var to the values of your individual coordinates

My favorite way to handle rects is this:
DIM FieldRect AS RECT ' Make it a var of type RECT
FieldRect.top = 0
FieldRect.left  = 0
FieldRect.right = WINDOW(_width) - _scrollWidth ' You would have set 
_scrollWidth, probably to 20?
FieldRect.bottom = WINDOW(_height)

  e-e
  =J= a  y
    "

On Friday, August 27, 2004, at 07:11  PM, Brian Heibert wrote:

> left = 1
> top = 1
> right = 1500
> bottom = 50
> Edit Field #8001, "", @FieldRect, _framed
>
> I am trying to get my edit field to fill up the whole window
> Here's the window code:
> WINDOW _tbeditor,"TBASIC",(  24,  80)-(1023, 806), _docNoGrow
>
> --
>
>