Create or Line up combo-box columns

franklin1232

New Member
I have a combo-box that has three database fields filling each line. How can I format the columns to line? Is there a columns property. I tried something from an earlier post.

cmbop:ADD-LAST(string(wrkcenter.WCcode,"x(15)") + string(NonConf.JobNum,"x(25)") + ChrOpNum).

This didn't line up the columns. It has to be possible I am just missing it.

Thanks
 

mnewnham

New Member
You would have to

1. Make sure you are usiing a fixed font (courier).

2. Left (or right) pad the strings to the correct length OR have one long string and use overlay to drop the database info at the right offset.
 

franklin1232

New Member
Overlay?

I am not sure I know how overlay works, but I printed some sample code. I also tried a fixed font still not lining up though. Here is what I wrote:

DO While Available(NonConf):
Assign ChrWrkCenter = string(wrkcenter.WCcode,"x(10)").
Assign ChrJobNum = string(NonConf.JobNum,"x(20)").
Assign ChrOpNum = String(Joboper.oprseq).
Assign Cmbfill = ChrWrkCenter + ChrJobNum + ChrOpNum.
/*cmbop:ADD-LAST(string(wrkcenter.WCcode,"x(15)") + string(NonConf.JobNum,"x(25)") + ChrOpNum).*/
cmbop:insert(cmbfill,1).
Get Next Ops.
END.
cmbop:insert("WrkCenter JobNumber Op Number",1).
END.
 

mnewnham

New Member
DO While Available(NonConf):
Assign ChrWrkCenter = string(wrkcenter.WCcode,"x(10)").
Assign ChrJobNum = string(NonConf.JobNum,"x(20)").
Assign ChrOpNum = String(Joboper.oprseq).
/*
Assign Cmbfill = ChrWrkCenter + ChrJobNum + ChrOpNum.
*/
overlay(cmbFill,1) = chrWrkCenter.
overlay(cmbFill.12) = chrJobNumber.
overlay(cmbFill,34) = chrNumber.
/*cmbop:ADD-LAST(string(wrkcenter.WCcode,"x(15)") + string(NonConf.JobNum,"x(25)") + ChrOpNum).*/
cmbop:insert(cmbfill,1).
Get Next Ops.
END.
cmbop:insert("WrkCenter JobNumber Op Number",1).
END.
 
Top