Visit SDSUSA site please  

Go Back   mvsHelp Boards > Help Bulletin Board > REXX, CLIST
User Name
Password
-->
FAQ Search Manuals Calendar New Posts Search Today's PostsMark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-12-2010, 07:22 AM
DoubtfulBadger's Avatar
DoubtfulBadger DoubtfulBadger is offline
Senior Member
 
Join Date: Jul 2006
Location: Letterkenny, Ireland
Posts: 365
Question Changing Attribute Colours on the fly ...

Anyone who uses edit highlighting will know that when you over-type a character, the colour changes from its original colour to yellow.

I'd like to do the same thing in a panel I'm developing but I can't see how to do it. Before anyone asks, I've R'd TFM.

I'm using a shadow variable and I thought that using a USERMOD definition might give me what I want. I've referred to panel ISREDDE2 (the main edit panel) but nothing's leaping out.

Any ideas?
__________________
Ken MacKenzie

The best laid schemes o’ mice an’ men,
Gang aft a-gley,
An’ lea’e us nought but grief and pain,
For promis’d joy.


To a Mouse - Robert Burns (January 25, 1759 – July 21, 1796)
Reply With Quote
  #2  
Old 07-12-2010, 09:22 AM
don.leahy don.leahy is offline
Senior Member
 
Join Date: Apr 2007
Location: Whitby, ON, Canada
Posts: 456
Default Emulator?

Quote:
Originally Posted by DoubtfulBadger
Anyone who uses edit highlighting will know that when you over-type a character, the colour changes from its original colour to yellow.

I'd like to do the same thing in a panel I'm developing but I can't see how to do it. Before anyone asks, I've R'd TFM.

I'm using a shadow variable and I thought that using a USERMOD definition might give me what I want. I've referred to panel ISREDDE2 (the main edit panel) but nothing's leaping out.

Any ideas?
I don't see how you can do it either. Until you hit Enter, or another action key, the mainframe does not know what you've done to the screen. I *think* the real-time highlighting when you overtype a character is done by the emulator you are using.
__________________
"Don't tell me how it works, tell me how it fails."
Reply With Quote
  #3  
Old 07-12-2010, 09:28 AM
DoubtfulBadger's Avatar
DoubtfulBadger DoubtfulBadger is offline
Senior Member
 
Join Date: Jul 2006
Location: Letterkenny, Ireland
Posts: 365
Default

Since my original post I have (re)discovered that you can change the over-type colour by entering HIlight, then selecting Colors from the action bar then selecting 1. Overtype Color ..., so you're not stuck with yellow.

It's been years since I used a dumb terminal but I'm pretty sure that dumb terminals would exhibit the same behaviour.


__________________
Ken MacKenzie

The best laid schemes o’ mice an’ men,
Gang aft a-gley,
An’ lea’e us nought but grief and pain,
For promis’d joy.


To a Mouse - Robert Burns (January 25, 1759 – July 21, 1796)
Reply With Quote
  #4  
Old 07-12-2010, 09:35 AM
don.leahy don.leahy is offline
Senior Member
 
Join Date: Apr 2007
Location: Whitby, ON, Canada
Posts: 456
Default

So much for my idea. I guess the Editor must do something to the 3270 data stream to cause this to happen. Interesting.
Reply With Quote
  #5  
Old 07-13-2010, 12:06 AM
nadel's Avatar
nadel nadel is offline
Senior Member
 
Join Date: Feb 2000
Location: Atlantis
Posts: 2,017
Default

Set the attribute byte that defines the input field in your dynamic area to the color you want.
__________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html .
Reply With Quote
  #6  
Old 07-15-2010, 08:53 AM
DoubtfulBadger's Avatar
DoubtfulBadger DoubtfulBadger is offline
Senior Member
 
Join Date: Jul 2006
Location: Letterkenny, Ireland
Posts: 365
Default

Sorry Doug,

I don't really know what you mean. Could you expand on your answer?
__________________
Ken MacKenzie

The best laid schemes o’ mice an’ men,
Gang aft a-gley,
An’ lea’e us nought but grief and pain,
For promis’d joy.


To a Mouse - Robert Burns (January 25, 1759 – July 21, 1796)
Reply With Quote
  #7  
Old 07-15-2010, 12:55 PM
PascalQ's Avatar
PascalQ PascalQ is offline
Senior Member
 
Join Date: Aug 2004
Location: Central Europe
Posts: 388
Default

you saw that they use those defs in the ispf editor, right?

Code:
<attr attrchar=0B TYPE=DATAIN INTENS=LOW CAPS=IN FORMAT=%MIXED COLOR=%ZPLEXCLR> <attr attrchar=0C TYPE=DATAIN INTENS=LOW CAPS=OFF FORMAT=%MIXED COLOR=%ZPLEXCLR>

if it's urgent and noone answers you could post sample code if you want, I might try to play around with it, but don't like to create panel with area and program from scratch
__________________
In the real world, nothing is fully secure
WebSphere MQ: Security
Reply With Quote
  #8  
Old 07-15-2010, 11:49 PM
nadel's Avatar
nadel nadel is offline
Senior Member
 
Join Date: Feb 2000
Location: Atlantis
Posts: 2,017
Default

Sorry Ken. Away for a few days. But as mentioned, when you define the DATAIN attribute which creates the input field in your dynamic area, assign it the colors you want.
__________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html .
Reply With Quote
  #9  
Old 07-16-2010, 06:31 AM
PascalQ's Avatar
PascalQ PascalQ is offline
Senior Member
 
Join Date: Aug 2004
Location: Central Europe
Posts: 388
Default

right, so while the folks are IPLing my system...

did my own panel experiments...

So, again let's say we have

Code:
0B TYPE(DATAIN) INTENS(LOW) CAPS(IN) COLOR(&ZPLEXCLR) FORMAT(&MIXED) B TYPE(CHAR) COLOR(BLUE) L TYPE(CHAR) COLOR(RED)

You'll then
1. format the field that you want the user to overtype with '0B' (in the ZDATA or whatever you use as data part for your dynarea)
2. "overwrite" every character with the shadow variable, using the TYPE(CHAR) formatting. So if you want to display a text in blue and make it become ZPLEXCLR (yellow by default), you'd specify "B" in the shadow variable for the field.
__________________
In the real world, nothing is fully secure
WebSphere MQ: Security
Reply With Quote
  #10  
Old 07-16-2010, 06:34 AM
DoubtfulBadger's Avatar
DoubtfulBadger DoubtfulBadger is offline
Senior Member
 
Join Date: Jul 2006
Location: Letterkenny, Ireland
Posts: 365
Cool Woo-hoo!

I got it working. Doug's answer was, of course, absolutely correct, it's just the user who needs to learn to read.

Here's a sample REXX and PANEL for anyone wishing to experiment. The words Green and Blue should appear (in the appropriate colours, with a yellow slash between) and when you overtype, they turn Red.
REXX:
Code:
/* REXX */ darea = '@Green/Blue' dshadow = ' GGGGGYBBBB' Address ISPEXEC "ADDPOP" "DISPLAY PANEL(XX)" "REMPOP"
Panel:
Code:
)ATTR \ AREA(Dynamic) Scroll(On) Usermod(35) G TYPE(CHAR) COLOR(Green) B TYPE(CHAR) COLOR(Blue) Y TYPE(CHAR) COLOR(Yellow) @ TYPE(Datain) Color(Red) )Body Width(77) Window(72, 12) Expand(//) %Command%==>_zcmd/ / \Darea,Dshadow/ /\ )End
__________________
Ken MacKenzie

The best laid schemes o’ mice an’ men,
Gang aft a-gley,
An’ lea’e us nought but grief and pain,
For promis’d joy.


To a Mouse - Robert Burns (January 25, 1759 – July 21, 1796)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 07:22 AM.


Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.