>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




General

Author Thread: Problem with Grid Width
Michael.Shumate
Problem with Grid Width
Posted: Wednesday, August 30, 2006 5:33 PM (EST)

I'm trying to make the grid the exact size of the rows and columns:

 

32 32×12 19
384 608
384 608÷16 8

24 76

 

There are 32 rows and columns, and the rows are 12 pixels and colums 19 pixels.

 

  '#' Œwi 'units'  
 16             8
  2             2
  1.333333333   1.333333333
  0.06666666667 0.06666666667
  1             1

 

The divide by 16 8 gets us back to a size of 24 76.

 

But when I set the size to 24 x 76 the rows fit perfectly but there is about 1.75 columns of white space on the left of the grid.

 

I'm not using any header rows or columns.

 

I have a seeking suspicion I've seen the answer before, but I can't find it.

 

Thanks,

/mas


Comments:

Author Thread:
Brian.Chizever
Problem with Grid Width
Posted: Wednesday, August 30, 2006 5:43 PM (EST)

Michael,

 

Just a guess, but are you using the <where> property or the <size> property?

 

For all APL+Win forms and controls the <size> property is the client area (without borders, scroll bars, titles, etc) while the <where> property is the size including the non-client area (external size).

 

I don't use the grid so this is only a guess.

 

-Brian

     

Rex.Swain
Problem with Grid Width
Posted: Wednesday, August 30, 2006 6:07 PM (EST)

In my experience, it is a mistake to assume that "the rows are 12 pixels and colums 19 pixels".  What I do is create the grid, set the number of rows and columns, set the cell formats and fonts, then query the actual height and width with

 

   h„+/Œwi 'xRowSize' ((-¼Œwi 'xHeadRows'),¼Œwi 'xRows')
   w„+/Œwi 'xColSize' ((-¼Œwi 'xHeadCols'),¼Œwi 'xCols')

 

and then set the size accordingly. 

 

This technique will help you handle users with various screen resolutions, possible "large fonts", and etc.

     



APL2000 Official Web Site

May the smile on your face Come straight from your heart
--- Anonymous

APLDN Home   |    |  Events   |  Trainings   |  APL Books   |  APLDN Links   |    |  Discussion Groups   |    |  Downloads   |  Articles   |  Library   |  Learning Tools   |  APLDN User IO   |  APL2000.com   |