Subject: Hide a field on a VB Form

On -Wed, 12 Dec 2001- lonniedrew wrote:
What table and field do you need displayed?

Lonnie,
I wanted to bring the system date into the VB Form using a Progress
program that is run from the ON ENTRY commands of the frame
attributes and save it to display only when a user pushed one of
three push button controls on the same form. These three push
buttons were to display a DATE/USER STAMP in their respective editor
controls of the form (similar to the DATE/USER STAMP in Vantage).
You are correct, there is no way to hide/disable or view/enable a
widget on a VB Form so I had to display it (no big deal, it's always
handy to know what day it is). The only work around that I found was
to create three separate Progress programs that work independently
for each push button/editor control (not too modular but it will
work).

Due to limitations of VB Forms this isn't quite the same as the
DATE/USER STAMP in Vantage but it's close.

Here's how I did it in case anyone is interested:

For This Example:
1. Add the following program to your Vantage\VBP directory
as datetime.p
2. Create any new VB Form available
3. Add an Editor Control from the Palette
(this should default to "EDITOR_1")
4. Add a Push Button Control from the Palette
(this should default to "BUTTON_1")
5. Double click BUTTON-1 and add the command
"runprog datetime.p" in the command box
6. Go to the actual VB Form and press BUTTON-1


/* datetime.p */
/* To DATE/USER STAMP a VB Form editor control */
/* using a VB Form button control. */

{vbp/vb.i}

DEFINE Variable strEditorContents AS CHARACTER NO-UNDO.

strEditorContents = getStringValue("EDITOR_1").

strEditorContents = strEditorContents + STRING(TODAY) + " "+
CAPS(USERID("vantage")) + ": ".

setStringValue("EDITOR_1.scrvalue":U,strEditorContents).

RETURN.


-----Original Message-----
Date: Wed, 12 Dec 2001 22:16:22 -0000
From: "lonniedrew" <lonniedrew@...>
Subject: Re: Hide a field on a VB Form

So far, no luck. But I'll not admit defeat that easily.

I couldn't think of a way to hide/disable or view/enable a widget on
a VB Form.

If you just want the data to be shown, maybe a small Progress
procedure that finds the current record and displays the field as a
message when button pushed. If it works, you can delete the fill-in
from the form.

What table and field do you need displayed?

Lonnie


--- In vantage@y..., "rleury" <beury@h...> wrote:
> You're Still "THE MAN"
>
> ----Original Message----
> Date: Wed, 12 Dec 2001 18:45:15 -0000
> From: "lonniedrew" <lonniedrew@c...>
> Subject: Re: Hide a field on a VB Form
>
> Gauntlet down!
>
> --- In vantage@y..., "rleury" <beury@h...> wrote:
> > Does anyone know of a way to hide a field on a VB Form? I have a
> > field on a VB Form that holds a return value from a progress
> program
> > and I only want to display it when the user clicks on a command
> > button in the form. It's a user/date stamp for a memo field in
the
> > RMA Detail VB Form. If I reduce the size of the field so that it
> is
> > barely visible then I get an error when viewing the form in the
RMA
> > tracker.
> >
> > Hey Lonnie...it can't be done!!!!