Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids
Message
From
07/10/1998 11:48:27
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
07/10/1998 09:42:59
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Re: Grids
Miscellaneous
Thread ID:
00144555
Message ID:
00144632
Views:
23
>I have a form with a couple of object and a grid with a lot of columns (about 60). I have 2 problems.
>
> 1) It seems that every time a have a large grid in a form, the refresh of the form does'nt work properly. I tried the lockscreen property without success.
>
> 2) Is there a way to freeze some columns in a grid like in Excel. I know that we can split a grid, but i dont want to see all my columns in the first part again in the second one.
>
> Thanks.

Alain,
1) Even with 254 columns grid refresh is nearly instant and stable unless tampered with underlying code, calculated controlsources or dynamic* settings.

2) I think you mean lock not freeze. If you really mean freeze just set other columns' enabled = .f. Not perfect but with partition and below code you can somewhat achive the effect. Mouse click is not included 'cause user can't see those "extra" columns to click.
* Init
#DEFINE lockcount 2
thisform.lockscreen = .t.
WITH this
  .panel = 1
  .columns(.columncount).setfocus
  .columns(lockcount+1).setfocus
  .panel = 0
  .columns(1).setfocus
ENDWITH
thisform.lockscreen = .f.

* BeforeRowColChange
LPARAMETERS nColIndex
#DEFINE lockcount 2
WITH this
  IF .panel = 0
    IF ( inlist(lastkey(),4,9,13) and nColIndex = lockcount ) or ;
        ( inlist(lastkey(),19,15) and nColIndex = 1 )
      .panel = 1
    ENDIF
  ELSE
    IF inlist(lastkey(),4,9,13) and nColIndex = .columncount
      NODEFAULT
      .columns(lockcount+1).setfocus
      .panel = 0
      .columns(1).setfocus
    ENDIF
    IF ( inlist(lastkey(),19,15) and nColIndex = lockcount + 1 )
      this.panel = 0
    ENDIF
  ENDIF
ENDWITH
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform