Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Overlay of fields - Make Visible and Invisible
Message
From
27/11/1998 04:05:48
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
26/11/1998 19:12:36
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00161874
Message ID:
00161903
Views:
20
>I use Foxpro 2.0 for dos. I want to have two fields occupy the same space on a form and have only one visible at a time depending on the users choice. Can I use bring to front/back in code or is what I want to do impossible? Thanks for the help.
>
>Rhea Urusky
>rheau@beaverplastics.com
Rhea,
You could do it :) Here in example suppose you have a variable m.which that controls which one would be displayed. Key elements :
- Each overlapping control has a when clause referring to m.which
@ 1,1 get control1 ... when m.which = 1
@ 1,1 get control2 ... when m.which = 2
You simply change (m.which = 1) to your lExpression

- You add a function (say shgets) to your cleanup and every code calling "show gets" calls shgets() instead
* a control's valid that changes the value of m.which
* ... code
=shgets()  && Call new "show gets"

* Button just doing refresh
@ nRow,nCol get .. valid shgets() && Also calls new "show gets"

* shgets code itself
function shgets
show gets       
if m.which = 1
   show get control1
else
   show get control2
endif
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
Reply
Map
View

Click here to load this message in the networking platform