× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: text entry widget?
  • From: James David Rich <james@xxxxxxxxxxxxx>
  • Date: Fri, 16 Jun 2000 16:17:06 -0600 (MDT)

Thanks to everyone who replied - since we are stuck on green screens VARPG
isn't an option.  I thought I'd share what we have come up with and maybe
folks can comment or have better ideas (or can send me flames - though
this list is pretty well behaved).  What we have so far:

We don't really need a full blown word processor, we just want to have
long descriptions or notes that go with each record in the db.  The
trouble is that the user wants to scroll through the notes like scrolling
through a document and be able to modify the contents as they scroll
through - without entering a new screen.  We want to word wrap as
appropriate both whatever they enter and the text that scrolls by.

One idea was to use an auto-advance field so that when the user reaches
the end of the field the program could scroll the entered text.  That
works great if you are entering text at the end of a field - but what if
you are deleting text in the middle of a field or want to go back to some
text not on the screen?

We couldn't figure out how to do that so we decided to limit the user to
750 characters of text per record.  So we use one big CNTFLD with WRDWRAP
for text entry.  The rest of the screen is filled with output-only fields.

When the program begins the first record is placed in the "active" area -
the CNTFLD field.  As many other records as will fit are placed below the
active area in the output-only fields - word-wrapped using a procedure I
wrote.  As the user scrolls the next record is placed into the active area
and the record previously active moves above the active area (as much as
will fit) and the screen below is again filled with the next records (as 
many as will fit - word-wrapped and all).  Records are placed next to each
other by removing trailing blanks.  This way we have a "window" on the
active record while viewing the records before and after.

Any comments on how to improve this model?  I hope this isn't too
off-topic - I can make code available that demonstrates this idea.  I plan
to put this in a service program and use a buffer to communicate data in a
generic fashion so that any program can use it.


James Rich
james@dansfoods.com

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.