General information
Category:
Forms & Form designer
>Cecil-
>
>>I call a form with the event click of a cmdSetTabs command button
>
>Is the second form modal, or modeless? If modeless the code in the command button will continue to execute after the DO FORM.
>
>> it then brings up another form allowing the end user to change the names that I display in the first form for each page of the page form... but on exiting the second form
>
>> I reload the pageframe.page1.caption for each page
>
>How? You set the captions in the command button after the DO FORM? How do you get the new caption values back to the first form?
>
>> and it is not reflecting the change. Tried thisform.activate, thisform.refresh, thisform.pageframe1.page1.refresh none seem to work BUT if I go into the second form again and just do an exit the first form is updated.
>
>Did you SET STEP ON in the release (?) of your second form, and then step through the code that should be changing the page captions?
in the click event I have the following...
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 buffer
use ..\data\tabhdr in 0
GO TOP
cHeader = ""
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
&cHeader..refresh()
thisform.pgFrame1.refresh()
THISFORM.REFRESH && above 2 below 3 lines will it work...
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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only