Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Turn off scroll bars in a listbox
Message
De
10/11/2000 02:55:46
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
09/11/2000 10:55:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00439631
Message ID:
00440075
Vues:
20
>I was afraid off that being the case, 3 months down the drain now, as I will have to start looking at grids with drag and drop.......oh what fun iam going to have.
>
>Thanks again

Iain,
You can drag&drop between grids. This could cut down your fun time :)
*Grid.Dragover
lparameters oSource, nXCoord, nYCoord, nState
lnDummyCol = 3 && A dummy col that would be activated
with this
  if nState = 0
    .setfocus()
  endif
  nNewRow = int((nYCoord - .headerheight - objtoclient(this,1))/.rowheight)+1
  * Doesn't have vertical scrollbar or not on vertical bar area
  if .scrollbars < 2 or nXCoord < objtoclient(this,2)+.width - sysmetric(5)	
    do case
      * Top thirds of top row
      case nYCoord < objtoclient(this,1)+.headerheight+.rowheight/3	
        .doscroll(2)	&& Scroll page up
      * Bottom thirds of bottom row
      case nYCoord > objtoclient(this,1)+.height-.rowheight/3
        .doscroll(3)	&& Scroll page down
    endcase
  else	&& On vertical bar area
    lnVerticalBarEnd = .height - iif(.scrollbars = 3, sysmetric(8), 0)
    do case
      * On Top scroll arrow
      case between(nYCoord-objtoclient(this,1), 0, sysmetric(6))
        .doscroll(0)		&& Scroll up
      case between(nYCoord-objtoclient(this,1), ;
          lnVerticalBarEnd - sysmetric(6), ;
          lnVerticalBarEnd)	&& On bottom scroll arrow
        .doscroll(1)		&& Scroll down
    endcase
  endif
  .activatecell(nNewRow,lnDummyCol) && Activate a dummy cell
  .refresh
endwith
This works with VFP5 too, in VFP6 there is GridHitTest which could ease the math.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform