Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PageFrame fails to show refresh on Tabs
Message
De
24/08/2001 19:45:13
 
 
À
24/08/2001 19:31:25
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00549050
Message ID:
00549062
Vues:
16
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform