Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Skip over a column in a grid?
Message
De
28/04/2000 04:57:22
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
27/04/2000 16:24:55
Jill Derickson
Software Specialties
Saipan, CNMI
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00358920
Message ID:
00364369
Vues:
36
>Hi Cetin,
>
>>... Unlike other controls neither when returning .f. nor enabled =.f. doesn't prevent setting focus by click. There are workarounds like blocking it with a shape, checking in BRCC etc
>
>I've been dealing with this very issue...what is the "BRCC" workaround?
>
>J


Jill,
This is BRCC from one of my grid classes :
LPARAMETERS nColIndex
llChangingRow = .f.
with this
  oColumn = .columns(.FindColumn(nColIndex))
  if lastkey() = 145 && Adding new rec
	.nLastValidRec = .nCurrec
  endif
  thisform.LockScreen = .lInGrid
  if mdown()
    lnBottom	= .top+.headerheight+.relativerow * .rowheight
    lnTop	 = lnBottom - this.rowheight
    lnMouseRowPos = mrow(wontop(),3)
    lnMouseColPos = mcol(wontop(),3)
    llChangingRow = !(between(lnMouseRowPos,lnTop, lnBottom) ;
		     and between(lnMouseColPos,.left,.left+.width))
  else
    llChangingRow	= inlist(lastkey(),24,5,18,3,145,148)
  endif

  if llChangingRow 
     if !empty(oColumn.dynamiccurrentcontrol)
	cCurrentControl = eval(oColumn.dynamiccurrentcontrol)
     else
	cCurrentControl = oColumn.currentcontrol
     endif
	with evaluate("oColumn."+cCurrentcontrol)
*		.value = .value && So we can evaluate table ruleexpression
	endwith
	oColumn = .null.
	if !empty(dbgetprop(.recordsource,"Table","RuleExpression")) ;
		and !evaluate(dbgetprop(.recordsource,"Table","RuleExpression"))
		thisform.LockScreen = .F.
		if messagebox(.cRevertMessage,4+16,"") = 6
			tablerevert(.f.,.recordsource)
			.recchange()
		else
			nodefault
		endif	
	endif
  endif
endwith
It has some custom methods and properties. Its purpose was to have an editable, addable grid with blank fileds checking (that's preventing VFP messaging kick in). Here primarily I dealt with "row" change, it could be modified to handle column changes and would be possible to know the column "attempted to move on". Hope helps.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform