Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding an object to an existing class

Status
Not open for further replies.

Hannes214

IS-IT--Management
Jan 30, 2006
45
DE
Hi

Is it possible, to add an Object ( Label, Image .. ) to an existing Page of a Pageframe?

I need a solution for the following problem:

...
npage = npage + 1
...
x.Pageframe1.Pagecount=npage
x.Pageframe1.Pages[npage].Caption='xxx'
...

now i want to add a label and an image to all the pages of the pageframe...
..is that possibnle? and whocan i do that?

IT-Management
( FoxPro-Newbi :eek:) )
 
Code:
FOR EACH oPage IN x.Pageframe1.Pages
    oPage.AddObject("Label99","Label")
    oPage.Label99.Top = xx
    oPage.Label99.Left = xx
    ** All properties you want set here

    *** THIS IS IMPORTANT. BY DEFAULT All objects added programaticly are invisible
    oPage.Label99.Visible = .t.

    oPage.AddObject("Image99","Image")
    oPage.Image99.Visible = .t.
ENDFOR
(not tested)

Borislav Borissov
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top