How to have a input box

Schreiber FooF

New Member
How to have an input box

/images/smilies/blush.gif/images/smilies/blush.gif/images/smilies/blush.gif/images/smilies/blush.gif/images/smilies/blush.gif
I'm very ashamed to ask this question...

I'm not keen on GUI programming in progress...

I need the code to have a simple input box in Progress 9.1C

Can someone give me a common way to have a "simple" input box :

- returning a string

- with parametrable text and title

- 3 buttons : yes-no-cancel


Something as stupid as that....

--------------------------------------------
| What is your name x|
--------------------------------------------
| Please enter your name |
| |
| -------------------------- |
| | John | |
| -------------------------- |
| |
| Yes No Cancel |
--------------------------------------------


Must be so simple do, I think... But I'm so bad that I can't do it...
/images/smilies/blush.gif/images/smilies/blush.gif/images/smilies/blush.gif/images/smilies/blush.gif/images/smilies/blush.gif
Thank You !
 

nborshukov

New Member
mistake in input.w

I found a mistake in input.w, which appears for "radio-set" mode.
In 'init-window' procedure in "create radio-set" statement the line:
HEIGHT-PIXELS = 10 * num-entries(w-format,chr(10))
must be replaced with
HEIGHT-PIXELS = 10 * num-entries(w-format,",":U)
 

cecsno

Member
Schreiber FooF said:
/images/smilies/blush.gif/images/smilies/blush.gif/images/smilies/blush.gif/images/smilies/blush.gif/images/smilies/blush.gif
I'm very ashamed to ask this question...

I'm not keen on GUI programming in progress...

I need the code to have a simple input box in Progress 9.1C

Can someone give me a common way to have a "simple" input box :

- returning a string

- with parametrable text and title

- 3 buttons : yes-no-cancel


Something as stupid as that....

--------------------------------------------
| What is your name x|
--------------------------------------------
| Please enter your name |
| |
| -------------------------- |
| | John | |
| -------------------------- |
| |
| Yes No Cancel |
--------------------------------------------


Must be so simple do, I think... But I'm so bad that I can't do it...
/images/smilies/blush.gif/images/smilies/blush.gif/images/smilies/blush.gif/images/smilies/blush.gif/images/smilies/blush.gif
Thank You !

DEFINE VARIABLE f-name AS CHARACTER FORMAT "x(15)" NO-UNDO VIEW-AS FILL-IN.
DEFINE VARIABLE l-name AS CHARACTER FORMAT "x(20)" NO-UNDO VIEW-AS FILL-IN.
DEFINE BUTTON y-button LABEL "&Yes".
DEFINE BUTTON c-button LABEL "&Cancel".
DEFINE BUTTON x-button LABEL "E&xit".
FORM
SKIP(1)
f-name LABEL "First Name" COLON 15
SKIP
l-name LABEL "Last Name" COLON 15
SKIP(2)
y-button AT 5
SPACE(15)
c-button
SPACE(2)
x-button
SKIP(1)
WITH FRAME a
SIDE-LABELS
TITLE "What Is Yor Name"
CENTERED
ROW 5
WIDTH 50
THREE-D.

ENABLE
f-name
l-name
y-button
c-button
x-button
WITH FRAME a.

ON 'choose':U OF y-button
DO:
ASSIGN
f-name = f-name:SCREEN-VALUE
l-name = l-name:SCREEN-VALUE.
RETURN.
END.
ON 'choose':U OF c-button
DO:
ASSIGN
f-name:SCREEN-VALUE = f-name
l-name:SCREEN-VALUE = l-name.
RETURN.
END.
ON 'choose':U OF x-button
DO:
APPLY "CLOSE" TO THIS-PROCEDURE.
RETURN.
END.
WAIT-FOR CLOSE OF THIS-PROCEDURE FOCUS f-name.
 

Schreiber FooF

New Member
Sorry Forgot to answer :

both version work well, just some problems linked to XP (windows size... )

but all Ok !!

Thank you both!!:toast:
 
nose on your face

This seems soo straight forward to myself. All you need is a .w with a fill-in * how many fill-ins needed, eg 5. in your frame on the container source just define (or drop) some fill-in widgets. This is Noddy UI stuff.
Regards
 
Top