************************************************** >*-- Class: lblheaderarrow (e:\vfp5app\ccontrol.vcx) >*-- ParentClass: clabel (e:\vfp5app\ccontrol.vcx) >*-- BaseClass: label >* >DEFINE CLASS lblheaderarrow AS clabel > > > AutoSize = .F. > Caption = "" > Width = 16 > *-- mcColumnName - name of the column the arrow is in > mccolumnname = "" > *-- mcDown - character used to point down > mcdown = "" > *-- mcUp - character used to point up > mcup = "" > *-- mcGridName - name of the grid this arrow is attached to > mcgridname = "" > Name = "lblheaderarrow" > > > *-- SetPosition - set the arrow position > PROCEDURE setposition > local loGrid, loCol > > loGrid = eval( this.mcGridName ) > for each loCol in loGrid.Columns > if ( loCol.Name == this.mcColumnName ) > with this > .Caption = iif( loCol.Header1.mlAscending, .mcUp, .mcDown ) > .Top = objtoclient( loCol.Header1, 1 ) + 2 > .Left = objtoclient( loCol.Header1, 2 ) + objtoclient( loCol.Header1, 3 ) - .Width > .Visible = .t. > endwith > exit > endif > endfor > ENDPROC > > > PROCEDURE Init > lparameter pcGridName > > local laFonts[1] > > afont( laFonts ) > with this > if ( ascan( laFonts, "Wingdings 3" ) > 0 ) > .FontName = "wingdings 3" > .mcUp = 'p' > .mcDown = 'q' > else > .FontName = "wingdings" > .mcUp = chr(225) > .mcDown = chr(226) > endif > .FontBold = .t. > .ForeColor = ColorFactor( this.parent.BackColor, 0.5 ) > .Caption = "" > .mcGridName = pcGridName > .MousePointer = 99 > .MouseIcon = "down.cur" > endwith > ENDPROC > > > PROCEDURE Click > * pass the click onto the Header > > local loCol > > loCol = eval( this.mcGridName + "." + this.mcColumnName ) > loCol.Click() > ENDPROC > > >ENDDEFINE >* >*-- EndDefine: lblheaderarrow >************************************************** >