General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only