Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where can we go for quick answers to vfp basics?
Message
De
09/07/1998 20:00:18
 
 
À
09/07/1998 06:13:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00115619
Message ID:
00115959
Vues:
15
>1 How do I force a label to update when it is on the form but not on the page?
>(Scenario - using pageframe with 5 pages to display all the detail on a customer's record but using a label (or could re-use field) below the pageframe to give constant display/reminder of what account we're looking at without having to repeat the company name on each page. Using 'thisform.refresh' seems to work erratically. If I go top, or bottom, no problem. But going 'next' or 'previous' and the refresh sometimes works, sometimes doesn't! In all cases, after moving the pointer I am using a simple code snippet in the form 'label=address.company' to assign the new value to the label. Have tried figuring out an alternative along the lines of 'thisform.label=address.company' or 'thisform.label.value=address.company' as well as thisform.label.refresh none of which work.
>
When I want a label to be "data - bound" ....
lblCompany.Init()
THIS.caption= address.company

lblDelStat.Init()
IF DELETED("address")
   THIS.caption= "DELETED"
ELSE
   THIS.caption= ""
ENDIF

form.refresh()
* refresh "say" labels...
WITH THISFORM
  .lblCompany.Init
  .lblDelStat.Init
ENDWITH
This is the equivalent of the old SHOW GETS OFF. I like using labels because they have a smaller resource than using a special txtBox.


>2. I have a simple form setup to ask questions of the user (eg 'Confirm - Exit the Program?')
>The problem is that I can't seem to get the program to stop and read the input. It does the form and carries on regardless. If we then press a button (eg 'Yes' to confirm exit) then despite capturing the variable I need, the program doesn't return, from the line 'do form choicewin.scx'. to the line after that in my program! Instead it goes straight to the 'read events' line in the main program loop. As a result, regardless of the choice made by the user, I can't run that choice. I've tried issuing further 'read events', or simple 'reads', but nothing works. Help?!
>

You need a Modal form - Set the "WindowType" property or call with Form.Show(1)
Or just use
IF MessageBox("Exit the application?", 36, "My App") = 6
myapp.closedown && or whatever...
ENDIF

>
No idea on 3 and 4, sorry :-((

Regards
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform