Skip to main content

[Migrated content. Thread originally posted on 30 June 2004]

Guys,

I've got a screen which 6 tabs on it, now when the user wants to change to a different tab I want to stop him doing this based on some variables in the application.

I'm currently using "Aft-Tabchg-Display" to get the details once they've changed display, but I was trying to do the following in "Bef-Tabchg-Display", but it seems to carry on anyway.

Can someone tell me what I need to do.

Thanks,

Shaun

EVALUATE EVENT-DATA-1
WHEN 02
IF WS-SOP-NOT-INST
MOVE 0404 TO MSG-KEY
PERFORM DISPLAY-MSG-GUI
MOVE EVENT-ACTION-FAIL TO EVENT-ACTION
MOVE 4 TO ACCEPT-CONTROL
MOVE 6 TO CONTROL-ID
EXIT PARAGRAPH
END-IF
......etc

[Migrated content. Thread originally posted on 30 June 2004]

Guys,

I've got a screen which 6 tabs on it, now when the user wants to change to a different tab I want to stop him doing this based on some variables in the application.

I'm currently using "Aft-Tabchg-Display" to get the details once they've changed display, but I was trying to do the following in "Bef-Tabchg-Display", but it seems to carry on anyway.

Can someone tell me what I need to do.

Thanks,

Shaun

EVALUATE EVENT-DATA-1
WHEN 02
IF WS-SOP-NOT-INST
MOVE 0404 TO MSG-KEY
PERFORM DISPLAY-MSG-GUI
MOVE EVENT-ACTION-FAIL TO EVENT-ACTION
MOVE 4 TO ACCEPT-CONTROL
MOVE 6 TO CONTROL-ID
EXIT PARAGRAPH
END-IF
......etc
By the time it performs "Bef-Tabchg-Display" event it has already set the visible variables for ALL 6 tabs (i.e. 5 tab's visible variables to "ZERO" and the user selected tab visible variable to "1").

Say current tab chosen is 1 so variables Tab1-Visible is = 1 while Tab2-Visible=0, Tab3-Visible=0, Tab4-Visible=0, etc. When user selects Tab2 the paragraph "Acu-....-cmd-Tabchanged" sets Tab1-Visible=0, Tab2-Visible=1, Tab3-Visible=0, Tab4-Visible=0, etc. Then it performs "Bef-Tabchg-Display" paragraph before it continues to display the screen.

You need to add some more code to reset these visible variables to settings before the user selected Tab2.

Try it. Hope this helps.