>object: [] cmdSetTabs procedure: Click >LOCAL i, lcFile >do FORM ..\forms\frmSetTabs && Modal Form... >* open file for headings >* for each page in pgframe1 >lcFile = Alias() >* >if file("..\data\tabhdr.dbf") >* use ..\data\tabhdr in 0 > select tabhdr > use && Added to close the file and re-open if in bufferOkay. I was going to suggest maybe the changes weren't being reflected.
> use ..\data\tabhdr in 0 > GO TOP > cHeader = "" > i=0 <b>SET STEP ON</b> > do while !eof() > i = recno() && set i to equal the record number > cHeader = "thisform.pgFrame1.Page"+ltrim(str(i))Step thru and check the following line to see if the values are what you expect.
&cHeader..Caption = tabhdr.name > &cHeader..ToolTipText = tabhdr.tooltips > &cHeader..refresh() > thisform.pgFrame1.refresh() > THISFORM.REFRESH && above 2 below 3 lines will it work...I don't understand this comment. Do you mean the refreshes work to make the captions refresh?
> THISFORM.ACTIVATE > THISFORM.DEACTIVATE > skip > enddo > select JustFName(lcFile) >else > messagebox("Tab Header file missing", 20) >endif >THISFORM.ACTIVATE >THISFORM.REFRESH >THISFORM.ACTIVATE >THISFORM.REFRESH>
>In the Init Method of the first form I load the tabs with this code... >object: [] frmBldTree procedure: Click >* Check to see if OCX installed and loaded. >*local descript >set talk off >clear >set deleted on >local lcFile, i >i=10 >IF TYPE("THIS.pgFrame1.Page1.oleTree1") # "O" OR ISNULL(THIS.pgFrame1.Page1.oleTree1) > RETURN .F. >ENDIF >public cString1 >public cDateTime1 >if type("LastSelected")<>"N" > public LastSelected > m.LastSelected = 0 >endif >m.cString1 = "Passed nothing" >m.cDateTime1 = Dtoc(Date())+ " " + time() >*m.descript = space(240) >lcFile = Alias() >if empty(lcFile) >* use ..\data\notedata in 0 exclusive >endif >* open file for headings >* for each page in pgframe1 >if file("..\data\tabhdr.dbf") > use ..\data\tabhdr in 0 > if used('tabhdr') > select tabhdr > cHeader = "" > * debug > i=0 > do while !eof() > i = recno() && set i to equal the record number > cHeader = "thisform.pgFrame1.Page"+ltrim(str(i)) > &cHeader..Caption = tabhdr.name > &cHeader..ToolTipText = tabhdr.tooltips > skip > enddo > endif > select JustFName(lcFile) >else > cPage = "Page " > cTool = "Tool Tip for Page " > cHeader = "" > for i = 1 to 10 > cHeader = "thisform.pgFrame1.Page"+ltrim(str(i)) > goto i > &cHeader..Caption = cPage+ltrim(str(i)) > &cHeader..Tooltip = cTool+ltrim(str(i)) > endfor >endif >* Force the loading of all files as if user pressed >* the "Load DBF" button >keyboard "{ALT+L}" >return