Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I shade one field in the middle a line

Status
Not open for further replies.

kalik01

Programmer
Nov 12, 2010
2
US
Does anyone know how to shade one field in the middle of a dislay line using char. based progress?
 
Sample code:
Code:
def var v-field1 as char format "x(10)" initial "NORMAL".
def var v-field2 as char format "x(10)" initial "REVERSED".

display v-field1 v-field2 with frame main.
color display messages v-field2 with frame main.
 
Thanks for you answer. Have you had experience with shading on a report? Output to a laserjet for example.
 
For that you would use PCL (Printer Command Language) control codes. You can google 'PCL' and find reference documents on-line.

PCL control is more commonly used to set properties for the entire printed page, i.e. landscape/portrait, font style/size, registration adjustment, etc.

The catch when printing with PCL codes embedded in the printline is that you must define the PROGRESS 'WIDTH' property so it is large enough to contain the printed output and the (non-printing) control codes.

Hint: All PCL control codes start with the ESCAPE character. Since this is a non-printing character, it must be generated in your Progress code with the CHR() function. For example, the say the PCL reference says a particular control code you want to use is '<ESC>abcd' (this is an entirely ficticious example). Your PROGRESS code would be:
Code:
def var v-control as character format "x(5)".
v-control = chr(27) + 'abcd'.
put control v-control.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top