LABEL problem

Moderator: Rathinagiri

Post Reply
asharpham
Posts: 55
Joined: Sat Mar 24, 2018 2:48 pm
DBs Used: DBF

LABEL problem

Post by asharpham » Thu Apr 05, 2018 7:22 pm

I have this code that is supposed to show the current record number above the details of the record I'm currently viewing:

PROCEDURE InsertRecNo
DEFINE LABEL LABEL_0
PARENT Library_1
ROW 90
COL 130
VALUE 'Record No '
FONTBOLD .T.
FONTSIZE 14
END LABEL

DEFINE LABEL CurrentRec
PARENT Library_1
ROW 90
COL 200
VALUE STR(LIBRARY->RECORD)
FONTCOLOR {255,0,0}
FONTBOLD .T.
FONTSIZE 14
END LABEL
RETURN


The second label above is to show the actual record number. When I first load the program, "Record 1" is clearly displayed with the number "1" in red. However, when I move in any direction, the new number flashes momentarily on the screen and disappears. This procedure is called from Toolbar buttons using ACTION { <Direction> , InsertRecNo() , Refresh() }. <Direction> is dbGoTop(), dbGoBottom(), dbSkip(1), etc. Also it appears that the FONTSIZE is ignored as the text "Record No" remains the same size as the rest of the text on the page. This is not a big issue but I wouldn't mind knowing why.

Regards,
Alan

Post Reply