Results 1 to 37 of 37

Thread: Checkbox & keydown [took some time but... RESOLVED!]

Threaded View

  1. #26

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Checkbox & keydown [took some time but... RESOLVED!]

    Here's my current (final?) version. I've made a few minor changes (value of row 4) and fixed scrolling problems. I have set the grid width as:
    VB Code:
    1. tx = Screen.TwipsPerPixelX
    2. With Grid
    3.     'Sum of the widths of all the columns (all have the same
    4.     ' width) plus the widths of the left and 'right borders
    5.     '(times 2, found by trial and error)
    6.     .Width = .ColWidth(0) * nVisibleCols + 4 * .BorderStyle * tx
    7.     'And I have added 3 extra pixels (see below)
    8.     .Width = .Width + 3 * tx
    9. End With
    Depending on the total grid width (play around with the number of extra pixels) some problems appear with scrolling. It appears that you need 2 extra pixels so that the rightmost visible column is considered totally visible, but then another pixel may be necessary to prevent unwanted scrolling effects (try and see).
    All in all I have the feeling that I'm on shaky ground and that the whole thing is a mess.
    Attached Files Attached Files
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width