Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 16 MAR 2007 12:43:21PM Terry Rainville wrote:

http://www.revelation.com/discuss.nsf/7a591c01171830eb8525652b0083c06

b/af2e4b2a6e20b9d18525674a007bb476?OpenDocument&Highlight=0,PAGEUP

Regarding this previous posting,

I basicly have same problem but did not understand the solutions given.

The basic problem is EDIT mode or F4 will not work if a field is in locked status (Non Editable), thus PgDN and PgUP cannot be activated.

AMV - Multi Fields, 1st field is VP (Viewable only)

Pressing F4 gets message saying field protected, PGDN PGUP Dont Work.

If you have any insight please let me know.


At 19 MAR 2007 02:12PM Ralph Johler wrote:

I added a scroll bar the AMV data set, so the user doesn't over-run the data with the down/up arrows. Couldn't figure out how to get the PgUp/PgDwn to work and gave up. All problems are shallow with enough work-arounds and code. :-)

*

SUBROUTINE SHOW_AMV_SCROLL(option)

/*

DESCRIPTION:

Shows/hides a primative scroll-bar just to the right of the last    
prompt in the AMV group.   The mouse can't be used to change your
postion in the AMV by draggin the scroll bar position indicator.
Display only.

PARAMETERS: options=the AMV Group number.

RETURNS: nothing

EXAMPLE: In your Window add the below subroutine to the "control"

        field pre-prompt of the AMV.
        S  SHOW_AMV_SCROLL,1
            where 1 is the AMV group number in this example.

HOW IT WORKS: Examines the Prompt data for the last prompt, and based

            on the X and Y coordinates of the prompt, and with width
            of the prompt, calculates starting position of the 
            scroll bar.
            Based on the depth of the prompt (number of lines) it 
            sets the length of the scroll bar.  The color of the
            scroll bar, is set to the prompt's LABEL color.
            Actually we use Light Yellow as the scroll bar color, 
            it is much more visable.  Possible future upgrade could
            include a new option which sets the color as a passed in
            'argument'.  This Light Yellow is hard-coded.

DEPENDENCIES: Moving the window is bad as the scroll bar stays behind.

            So don't do that.  We don't care as our windows
            are all the max size of the screen and can't be moved.

HISTROY:

07/29/2005 - Created this program new. - Ralph Johler

*/

$INSERT SYSINCLUDE, WINDOW_COMMON%

$INSERT SYSINCLUDE, WINDOW.CONSTANTS

$INSERT SYSINCLUDE, LCPOSITIONS

$INSERT SYSINCLUDE, COLOR.CONSTANTS

$INSERT SYSINCLUDE, LOGICAL

amv_group =FIELD(option,"*",1,1)

amv_prompts =WC_AMV%

first_prompt =WC_WI%

/* For debugging.

PRINT @(2,31):SPACE(4):@(2,31):amv_prompts:SPACE(5)

PRINT @(2,33):SPACE(4):@(2,33):amv_prompts:SPACE(5)

*/

p=1; more_prompts=1

LOOP

REMOVE last_prompt FROM amv_prompts AT p SETTING more_prompts

WHILE more_prompts REPEAT

xpos =WC_PROMPTS%

ypos =WC_PROMPTS%

width=WC_PROMPTS% ;*end of the amv, how wide it is

depth=WC_PROMPTS%

color=WC_PROMPTS%

* These are the positions of the top or upper left hand corner of the

* window. If the user moves the window, these then are updated by the

* window processor.

left= WC_WLX%

top=WC_WLY%

cur_bottom=WC_WRY%

int_bottom=WC_WINDXY%

* For debuggin.

*ptext1=Cur=:cur_bottom:" Init=:int_bottom:" Depth=:depth

*PRINT @(2,41):SPACE(4):@(2,41):ptext1:SPACE(5)

* Adjust the depth, in the event the user has moved the bottom of the

* window when moved down, do nothing as the amv will not expand, but

* if the user moves up the bottom of the window we do not want the

* scroll bar extending past the bottom of the window.

IF cur_bottom LT int_bottom THEN

depth=depth + (cur_bottom - int_bottom)

END

* Adjust the x & y pos by the left & top position counters to move the

* scroll bar with the window if the user moves it.

xpos=xpos+width+(left)

ypos=ypos+(top)

amv_count=WC_AMV_VARS%

backg_color=@AW

* Change this color to change the color of the scroll bar's GLOBALLY.

color=LYEL$

* Just in case the background color is the same as the scroll bar

* color, making the scroll bar invisable, we'll set the scroll bar

* to any old non-background color.

IF backg_color EQ color THEN

IF backg_color EQ WHITE$ THEN
 ][color=BLACK$
END ELSE
 ][color=WHITE$
END

END

/* FOR DEBUGGING - PRINTS BELOW THE WINDOW. - using debug in this sub

 is a *pain* in these window processing calls.

ptext1=WC_MV_NEXT%=:WC_MV_NEXT%:" WC_MV%=:WC_MV%

ptext2=trigger=:trigger:" amv_count=:amv_count:" vdepth=:depth

ptext3=direction=:direction

ptext4=WC_IS%=:WC_IS%

PRINT @(2,31):SPACE(4):@(2,31):ptext1:SPACE(5)

PRINT @(2,32):SPACE(4):@(2,32):ptext2:SPACE(5)

PRINT @(2,33):SPACE(4):@(2,33):ptext3:SPACE(5)

PRINT @(2,34):SPACE(4):@(2,34):ptext4:SPACE(5)

*/

BEGIN CASE

CASE amv_count EQ 0
  scrollpos=0
CASE WC_MV% EQ 1
  scrollpos=0
CASE WC_MV% LT amv_count
  scrollpos=OCONV(WC_MV%/amv_count,"MD1P")
CASE 1
  scrollpos=1

END CASE

IF scrollpos LT 0 THEN scrollpos=0

IF scrollpos GT 1 THEN scrollpos=1

* DEBUGGING INFO PRINTS BELOW THE WINDOW

 is a *pain* in these window processing calls.

ptext1=WC_MV_NEXT%=:WC_MV_NEXT%:" WC_MV%=:WC_MV%

ptext2=trigger=:trigger:" amv_count=:amv_count:" vdepth=:depth

ptext3=direction=:direction

ptext4=WC_IS%=:WC_IS%

PRINT @(2,31):SPACE(4):@(2,31):ptext1:SPACE(5)

PRINT @(2,32):SPACE(4):@(2,32):ptext2:SPACE(5)

PRINT @(2,33):SPACE(4):@(2,33):ptext3:SPACE(5)

PRINT @(2,34):SPACE(4):@(2,34):ptext4:SPACE(5)

*/

BEGIN CASE

CASE amv_count EQ 0
  scrollpos=0
CASE WC_MV% EQ 1
  scrollpos=0
CASE WC_MV% LT amv_count
  scrollpos=OCONV(WC_MV%/amv_count,"MD1P")
CASE 1
  scrollpos=1

END CASE

IF scrollpos LT 0 THEN scrollpos=0

IF scrollpos GT 1 THEN scrollpos=1

* DEBUGGING INFO PRINTS BELOW THE WINDOW

*ptext2=scrollpos=:scrollpos:" amv_count=:amv_count:" vdepth=:dep

*PRINT @(2,31):SPACE(4):@(2,31):ptext1:SPACE(5)

*PRINT @(2,33):SPACE(4):@(2,33):ptext2:SPACE(5)

*

CALL SHOWSCROLL(xpos, ypos, depth, scrollpos, , , '', 1, color)

/* more debugging

X1= WC_CRT_VX% ;* The physical screen X-coordinate of the curr

X2= WC_CRT_VY% ;* The physical screen Y-coordinate of the curr

*X3= WC_CRT_VLEN% ;* The physical screen length of the current p

*X4= WC_CRT_VDEPTH% ;* The physical screen depth of the current pr

x3=wc_amv%

x4=WC_AMV%

X5=WC_PROMPTS%

print @(2,40):space(40):@(2,40):"Physical screen x-coord=:x1

print @(2,41):space(40):@(2,41):"Physical screen y-coord=:x2

print @(2,42):space(40):@(2,42):"Amv prompts=:x3

print @(2,43):space(40):@(2,43):"Last prompt of amv 1=:x4

print @(2,44):space(40):@(2,44):"Prompt data=:x5

*/

RETURN


At 19 MAR 2007 03:17PM Terry Rainville wrote:

Thanks!!

Anyone else have any ideas ???


At 28 MAR 2007 02:48PM Terry Rainville wrote:

For anyone who is interested I have found a solution to PGUP PGWN

Using Cntl-pgup and Cntl-pgdn

if wc_wc%=\0084\ or \0076\ then

catalyst('K', '{CNTL-G}':wc_mv% +(or)- value:'{CR}')

end

wc_wc% captures the cntl-pgup and cntl-pgdn and then you make cusor

go to the position you want to be at.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/08207b856fb2c2d4852572a0005bdc10.txt
  • Last modified: 2023/12/28 07:39
  • by 127.0.0.1