Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loop Thru Pageframe and change caption font size
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01333641
Message ID:
01333782
Views:
10
>I have a function that changes the fontsize and underline of any selected pageframe so the customer can tell which page they are on. This works great and changes the font size to 10 Bold and underline when they are on the page, and resets it to 10 normal with no underline when they exit a page. My problem is that my new computers have 24 inch screens and since the screens automatically expand to fill the screen size, the font size when the program starts is 15, which is too large. I don't want the rest of the fonts to change, just the pageframe captions. Now when they exit a page the font is correct but all the other pageframe captions are too large.
>
>
>If someone knows how to loop thru the pages in a pageframe and change just the font size when the program first starts and not affect the rest of the font sizes that would be the answer.
>
>Any by the way, 24 inch screens are really too large. I think the 22 inch screens I had were just about right.
>
>At least I don't have "Monitor Envy" anymore...

FOR EACH oPage IN thisform.PageFrame
oPage.FontSize = 10
oPage.FontBold = .f.
oPage.Fontunderline = .f.
BINDEVENT(oPage,[Activate], thisform, [PageActivate], 1)
BINDEVENT(oPage,[DeActivate], thisform, [PageDeActivate], 1)
NEXT



**** Form PageActivate method
AEVENTS(laEvents,0)
WITH laEvents[1]
oPage.FontSize = 10
oPage.FontBold = .t.
oPage.FontUnderline = .t.
ENDWITH

**** Form PageDeActivate method
AEVENTS(laEvents,0)
WITH laEvents[1]
oPage.FontSize = 10
oPage.FontBold = .f.
oPage.FontUnderline = .f.
ENDWITH


NOT TESTED!!!!

BTW you could use your own Page class with Activate and Decativate events. Check MemberClass and MemberClassLibrary in Help
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform