Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Refresh
Message
From
29/07/1999 11:08:53
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00247663
Message ID:
00247688
Views:
24
John,

I use Bold and Italic font properties, I only create indexes on cursors - this is a very simple and I do not check for errors...

DEFINE CLASS myheader AS 'HEADER'

PROCEDURE Click

LOCAL lcTag, lcExpression, lnRecNo

_SCREEN.MousePointer= MOUSE_HOURGLASS

lnRecNo= RECNO()

WITH THIS

lcTag= ALLTRIM(LEFT(.caption,8))
lcExpression= ALLTRIM(.caption)

*!* Create a new tag if possible
IF TAGNO(lcTag)= 0
IF CURSORGETPROP('sourcetype')<3
INDEX ON &lcExpression TAG &lcTag
ELSE
MESSAGEBOX('Column does not have an index',16)
RETURN
ENDIF
ENDIF

THIS.PARENT.PARENT.visible= .F.

DO CASE
CASE !.FontBold AND !.FontItalic
SET ORDER TO (lcTag) ASCENDING
.PARENT.PARENT.SetAll('FontBold',.F.,'myHeader')
.PARENT.PARENT.SetAll('FontItalic',.F.,'myHeader')
.FontBold= .T.
CASE .FontBold
SET ORDER TO (lcTag) DESCENDING
.PARENT.PARENT.SetAll('FontBold',.F.,'myHeader')
.PARENT.PARENT.SetAll('FontItalic',.F.,'myHeader')
.FontItalic= .T.
CASE .FontItalic
SET ORDER TO
.PARENT.PARENT.SetAll('FontBold',.F.,'myHeader')
.PARENT.PARENT.SetAll('FontItalic',.F.,'myHeader')
ENDCASE

.PARENT.SetFocus()

ENDWITH

IF lnRecNo > 0
GOTO lnRecno
ELSE
GOTO TOP
ENDIF

*!* BRINGS RECORD BACK INTO VIEW
KEYBOARD '{RIGHTARROW}'
KEYBOARD '{LEFTARROW}'

THIS.PARENT.PARENT.visible= .T.

_SCREEN.MousePointer= MOUSE_DEFAULT

MOUSE AT MROW('',3),MCOL('',3) PIXELS
ENDDEFINE
Previous
Reply
Map
View

Click here to load this message in the networking platform