Fill-in from view-as-text to native?

wbenhart

New Member
Hello everyone, I need some help changing the object properties for a fill-in.

What I have is a fill-in where the view-as-text and read only are checked.
At run time the field looks like a label. What I want to do is at run
time, right click on the fill-in and change the properties back to native and
allow the user to type into the fill-in.

I have not figured out how to change the view-as-text to native.

Here is what I have so far:

ON RIGHT-MOUSE-DOWN OF Alt-Ref01-Label IN FRAME DEFAULT-FRAME
DO:
ASSIGN
Alt-Ref01-Label:READ-ONLY = FALSE

DISPLAY
Alt-Ref01-Label
WITH FRAME {&FRAME-NAME}.

APPLY 'entry':U TO Alt-Ref01-Label.
END.



Thank you
Wayne
 

joey.jeremiah

ProgressTalk Moderator
Staff member
the view-as phrase specifies
what type of widget to use ( to represent the variable )

so view-as text would make it a text not a fill-in widget
which isn't updateable

i think what you're looking for
is the sensitive property or enable statement i.e. make it updateable


i highly recommend reading
the chapter on graphical objects in the progress 4gl handbook

either that or take a few minutes to read thru
the on-line editor or appbuilder help ( f1 )

i think, you'll be far more happy this way
 

wbenhart

New Member
Thanks for the advice, but what I am looking for is a method of changing the labels of a fill-in field. What I was doing was using two fill-in fields, one for the label and one for the actual fill-in. I want to be able to change the label of a fill-in and store the new "Label" in a database. This will allow the user to re-label fields the way the user want to see it.

Wayne
 

joey.jeremiah

ProgressTalk Moderator
Staff member
if it's to add translations to other languages ?
there's a few choices i'd recommend

you can use the translations tools
to add translations to your .r file for strings
that haven't been explicitly specified untranslatable ( :u )

or if you're using dynamics ( you can also incorporate part of it )
dynamics will show you all the labels, titles etc. in a window
and let the users actively participate in the translations
( unless you disable it, in the security options )

in terms of user interface
nothing comes close to dynamics
 

Casper

ProgressTalk.com Moderator
Staff member
Why not change the label atribute of the fill in.
i.e. fill-in:label in frame blabla = 'new label'.

Casper.
 

gcampbell

Member
What I'd do is create a separate Dialog window that would open up whenever the user performs the specified action. Pass in the handle of the widget you want to change and display the current label. Allow them to change it in a fill-in and then redisplay the label handle on your form.

Or, overlay the current label with a dynamically created fill-in widget that will allow them to change the value. Of course, you'd need to program this 'mode' into your existing code ... that's why doing it via a LabelEditor dialog-box is a much neater and simpler way to implement this.

Just my .02c

later,
Gordon
 

nborshukov

New Member
Here is a procedure I use to change labels of "standard" fill-ins, combo-boxes, etc.
Run it persistent and send as input parameter a handle of fill-in widget.
 

Attachments

  • edit-label.p
    2.9 KB · Views: 52
Top