Ravindra Patil
Programmer
Dear friends,
I want to change caption color of active page of a pageframe to blue and turn rest of the pages' captions to black.
I tried the following code in activate event of each page. It's working.
But rather than putting the code in each page's activate event, is there any centralized event that can be used for this purpose?
I tried ChatGPT. It suggested Pageframe1.PageChange event. But such an event/method is not there.
I want to change caption color of active page of a pageframe to blue and turn rest of the pages' captions to black.
I tried the following code in activate event of each page. It's working.
But rather than putting the code in each page's activate event, is there any centralized event that can be used for this purpose?
I tried ChatGPT. It suggested Pageframe1.PageChange event. But such an event/method is not there.
Code:
this.FontBold = .t.
this.ForeColor = RGB(0,0,255)
FOR EACH pg IN this.Parent.Pages
IF pg.name#this.Name
pg.FontBold = .f.
pg.ForeColor = RGB(0,0,0)
ENDIF
NEXT pg
this.Refresh