[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

603.0. "Multi-line field Word wrap?" by USHS09::REINDL (The Duckbilled Platypus has no Navel) Wed Apr 29 1992 18:26

    
    This may have been brought up before but...  I have a customer here who
    is working on an ALL-IN-1 application where he has a long description
    field on a form. It covers 3 lines 230 bytes. The user of the
    application would like the field(s) to act like they would in the word
    processor (when inserting, having words wrap to the next line is what
    they really want). Has anyone tried to put together something like this
    before? Any ideas if not??  The only things I can think of are, writing
    an SMG based subroutine to do the dirty work, or DECFORMS V1.4 is
    supposed to have that capability but how would we integrate it??
    
    Thanks in advance for all help and suggestions.
    
    - Henry
T.RTitleUserPersonal
Name
DateLines
603.1Crude solution isn't difficult.HOTAIR::MADDOXWhen in doubt, change itWed Apr 29 1992 23:2238
Henry,

Realize that WPS PLUS style word-wrap will not be possible on an FMS form.
I.e., you will not be able to push words off the end of one line and onto
the next while typing in insert mode.  FMS doesn't support anything like
this and ALL-IN-1 doesn't have any control of a field until the user exits
it.

That said, you could provide some functionality by allowing words to wrape
off the end of one line and onto the next while the user is entering text
for the first time.

It might look like this (this is untested code).

;;line1;; (seventy bytes long, autotab attrib.)

/post='
.if oa$field_term_name eqs "down" or oa$field_term_name eqs "tab" and
      line1:1:70 nes "" and line2 eqs "" then
   get #temp = line1:h\\
   get_token #temp, #temp2, " "\\
   get line1 = #temp:h\\
   get line2 = #temp2:h'

On second look, this is still going to be pretty ugly.  If a whole word
just happened to finish in position 70 this code will still move it to
the next line.  An even greater problem is that there is no way to 
position the cursor in LINE2 after the text which has already been moved
down there.  The user would have to arrow over to the end of the already
entered text.

I suppose you could have a bunch of one-character fields adjacent to 
each other with autotab set on each and then do logic to move characters
around to simulate word-wrap, but that would be a lot of trouble.

Maybe someone else has a better idea.

Joe
603.2It has been done...SHALOT::LANPHEARTest the water or turn the tide?Thu Apr 30 1992 18:146
    There was a DECUS package that did this (aka free if you belong to
    DECUS).  It was called something like Baby-ed or Baby Ed.  I don't
    recall all the details, but it simulated an editor for a multi field
    form.  Perhaps somebody else can provide more information.
    
    					Cheers, Dan'l
603.3Maybe but it's hiding...USHS09::REINDLThe Duckbilled Platypus has no NavelMon May 11 1992 23:3610
    
    Does anyone have anything more on -.2??  We've looked high and low
    through the DECUS stuff and haven't found a hint of anything like
    Baby-ed. I've looked in the toolshed and there's not much there either.
    
    Any other input on this topic would be greatly appreciated!!!
    
    re -.1  That little bit if script will help in the short term.
    
    - Henry