Jump to content


Photo
- - - - -

How to display a backward field


20 replies to this topic

#1 Vol Yip

Vol Yip

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 393 posts
  • Gender:Male
  • Location:Hong Kong

Posted 17 June 2004 - 10:59 AM

All,

I have a senario.

I need to write a superlayer screen which has a few fields at a paging screen. For example:

\PS\
FLD 1
FLD 2
FLD 3
FLD 4
\PE\

User will navigator across FLD1, FLD2 and FLD3. Where FLD3 is actually a check box where if checked, FLD1 and FLD2 will be defaulted to some special values.

I have no problem to code such that if FLD3 is checked, assign values to FLD1 and FLD2. However, since the cursor now is at FLD3 and will keep on move to FLD4, how can I code such that the screen displays the assigned values in FLD1 and FLD2 after user checked FLD3?

Regards,

Vol

#2 Lewis Mccabe

Lewis Mccabe

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 455 posts
  • Gender:Male
  • Location:Sarasota, Florida

Posted 17 June 2004 - 11:08 AM

Vol,

Add 2 fields after your check box which are duplicates of fields 2 and 3. Make them display only and use the overlay field option to have them redisplay over their associated fields.

Lew

#3 Vol Yip

Vol Yip

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 393 posts
  • Gender:Male
  • Location:Hong Kong

Posted 17 June 2004 - 11:14 AM

Thx Lew,

I will try that out.

Regards,

Vol

#4 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 17 June 2004 - 11:15 AM

Hi,

If I remeber correctly, your on the Glovia kernel?? If you were on the ProIV Kernel, version 5.0+ has the .Refresh property that you could use to redisplay the value.

In versions before 5.0, you would have to have the fields defined twice so that they get redisplayed...

\PS\
FLD 1
FLD 2
FLD 3
FLD 1
FLD 2

FLD 4
\PE\


You might have to do some 'Manual' positioning since you are in SL, because you will need to get the row/col of FLD2 & 3 to the same value as the previous fields 1 & 2.

Rob D.

#5 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 17 June 2004 - 11:15 AM

Oops... you beat me to it Lewis :)

#6 Lewis Mccabe

Lewis Mccabe

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 455 posts
  • Gender:Male
  • Location:Sarasota, Florida

Posted 17 June 2004 - 11:30 AM

Vol,

The overlay field option is in the more window of the field definition.

#7 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 17 June 2004 - 03:52 PM

Vol,

You may also need to do the following "trick".

The problem (with what you are doing) is that clicking a check box does not advanced the user to the next field. Rather, the user is now sitting in the check box field.

So, the default values will only appear if the user clicks the check box and then presses enter.

You can make the check box a display only field. This still allows the user to click the check box, but then also allows you to do work immediately upon the check.

hth,

Joseph

#8 Richard Brauer

Richard Brauer

    Member

  • Members
  • PipPip
  • 24 posts
  • Gender:Male
  • Location:Riverside, United States

Posted 17 June 2004 - 04:58 PM

To get the cursor to move automatically after 'check'ing the check box, use ENABLE(&#@NO-CR) in the field before logic.

#9 Vol Yip

Vol Yip

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 393 posts
  • Gender:Male
  • Location:Hong Kong

Posted 18 June 2004 - 06:34 AM

All, the overlay field works.

Just a cosmetic issue, if I overlay a Display only field back to the input field, the COLOR of the field will show Display Only color (instead of the color of a input field). Is that something I can do?

Regards,

Vol

#10 Vol Yip

Vol Yip

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 393 posts
  • Gender:Male
  • Location:Hong Kong

Posted 21 June 2004 - 04:21 PM

All,

The screen has some strange behaviour and need some helps.

I have coded the paging screen looks like the followngs;
\GS\
FLD0
\PS\
'' DAO
FLD1 DAO
FLD2
FLD3
FLD4 <----- a check box with ENABLE(&#@NO-CR) at before logic
FLD5 DAO
FLD6 DAO
FLD7 DAO
\PE\
\GE\

Where FLD5 overlays to FLD2 and FLD6 overlays to FLD3
The '' field is to read file for the paging group.

When first diaplay the screen, everything looks good.
When cursor goes to FLD4 and check, FLD2 and FLD3 will display some values set at the Header which is good.
The function is designed such that if FLD4 is unchecked, FLD2 and FLD3 need to set to empty.

Now, the problem is:

If the paging screen has many lines. (Say 20). And each page can display 8 lines.
All the lines have been checked. I.e., all FLD2 and FLD3 have values display at screen. If I go to unflag line 2. FLD2 and FLD3 of line 2 become blank which is good. And the cusor goes to FLD2 of line 3 which is good too. However, all FLD3 become empty from line 3 to line 7. If I press Page Down and Page Up again, the values show up again. I.e., actually the values are there but just do not display.

Don't understand why all the FLD3's values disappear for line 3 to line 7. (But FLD2 has no problem) Is that something relates to Overlay field?

Regards,

Vol

#11 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 21 June 2004 - 07:32 PM

Vol,

We had some problem (that I don't exactly remember) when implementing a similar screen using &#@NO-CR.

I would recommend that you see if the same behavior occurs if you take out the &#@NO-CR...

hth,

Joseph

Edited by Joseph Bove, 21 June 2004 - 07:36 PM.


#12 Vol Yip

Vol Yip

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 393 posts
  • Gender:Male
  • Location:Hong Kong

Posted 22 June 2004 - 12:30 AM

Hi Joseph,

I took out &#@NO-CR. Now after unchecked FLD4 at line2, I need to press enter to move cursor to next line. FLD2 and FLD3 of line2 then blank. However, same problem happens. I..e, FLD3 of line 3 to line 7 become blank too. :)

Regards,

Vol

#13 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 22 June 2004 - 02:11 PM

Vol,

You may as well put &#@NO-CR back in.

Is your checkbox field a scratch variable?

If so, this may explain the behaviour.

Regards,

Joseph

#14 Vol Yip

Vol Yip

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 393 posts
  • Gender:Male
  • Location:Hong Kong

Posted 23 June 2004 - 02:27 AM

Yes, all my FLD2, FLD3, FLD4, FLD5 and FLD6 are scratch variables. They are read from the file read logic at the field ''

Do you mean scratch variables will introduce this issue?

Regards,

Vol

#15 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 23 June 2004 - 02:57 PM

Vol,

We encountered this issue. I was not heavily involved in it, but from what I remember, the programmer used a meaningless field from a temp file instead of a scratch variable checkbox and the problem went away.

hth,

Joseph



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users