Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help: Form Wizard
Message
From
27/07/1999 08:02:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
26/07/1999 20:08:16
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00246385
Message ID:
00246495
Views:
21
>I created a form using the Form Wizard, with the buttons to navigate and modify records.
>But now I need a TextBox in this form, enabled when the form appears, so that I can navigate to record N.
>The problem is that any TextBox created in the form is not enabled until I click the Edit Record Button (even if the property Enabled is True)!!!! How can I correct this, so that when the form appears the TextBox is allready enabled?
>Thank you very much!
>Araxes
Pedro,
I don't remember the exact place but it was navrefresh or buttonrefresh (more likely navrefresh) code enabling-disabling code. On wizard form dbl click wizard buttons to open code window and from right dropdown select navrefresh. Add code (assuming your textbox name is "myTextbox"):
dodefault()
with thisform.myTextbox
  .enabled = !this.editmode
  .readonly = this.editmode
endwith
* Lostfocus of myTextBox
with this
 if !isnull(.value) and between(.value, 1, reccount())
    go .value
    thisform.refresh
 endif
endwith
* You might also call navrefresh here. I'm not sure
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform