Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic PageFrame
Message
From
07/09/2001 12:08:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00553855
Message ID:
00553871
Views:
13
>I want to add pages to a pageframe on the fly. How do I get code run
>when the user clicks/rightclicks in a newly added page?
>
>Thanks

Design your pageframe as a class that also uses your sublassed pages. This would be done in a nonvisual (prg) way easily. ie:
Define class myPageFrame as pageframe
  Procedure init
  Lparameters tnPages
  This.pagecount=0
  For ix=1 to tnPages
    This.addobject('page'+padl(ix,2,'0'),'myPage')
  Endfor
  This.setall('Visible',.t.)
Endproc
Enddefine

Define class myPage as Page
  Procedure click
  Wait window nowait 'hello'
Endproc
  Procedure rightclick
  Wait window nowait 'there'
Endproc
Enddefine
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform