↑ ↓ ← → Tower Ty <towerty msn.com.au>
writes:
Content-Type: text/plain
Nice new site ,quicker too ,
here is a line that you may be able to use and enhance-pretty basic though as
yet
↑ ↓ ← → Tower Ty <towerty msn.com.au>
writes:
Tower Ty Wrote:
Nice new site ,quicker too ,
here is a line that you may be able to use and enhance-pretty basic though as
yet
module Line;
import dwt.DWT;
import dwt.widgets.Composite;
import dwt.widgets.Text;
import dwt.widgets.Shell;
import dwt.widgets.Display;
import dwt.layout.RowLayout;
import dwt.events.ModifyEvent;
import dwt.events.ModifyListener;
import tango.io.Stdout;
import dwt.dwthelper.Integer;
class Line {
public: this (Composite parent ,int style ) {
auto line = new Composite(parent,style);
line.setSize(700,40);
//RowLayout layout= new RowLayout();
//line.setLayout(layout);
auto No = new Text(line,DWT.LEFT);
No.setBounds(1,15,10,15);
//No.setLocation(1,15);
//No.setSize(10,15);
No.setText("1");
No.setEditable=true;
No.setTextLimit(5);
addTextListener(No);
auto ChqDate = new Text(line,DWT.RIGHT);
ChqDate.setBounds( 21, 15, 60, 15);
ChqDate.setText = "10/04/08";
ChqDate.setEditable = true;
ChqDate.setTextLimit(8);
addTextListener(ChqDate);
auto ChqNo = new Text(line,DWT.RIGHT);
ChqNo.setBounds( 90, 15,70, 15);
ChqNo.setText = "123456789";
ChqNo.setEditable = true;
ChqNo.setTextLimit(20);
addTextListener(ChqNo);
auto Details = new Text(line,DWT.LEFT);
Details.setBounds( 170, 15,100, 15);
Details.setText = "Bob the Builder ";
Details.setEditable = true;
Details.setTextLimit(50);
addTextListener(Details);
auto Code = new Text(line,DWT.RIGHT);
Code.setBounds( 280, 15, 30, 15);
Code.setText = "340";
Code.setEditable = true;
Code.setTextLimit(4);
addTextListener(Code);
auto Debit = new Text(line,DWT.RIGHT) ;
Debit.setBounds(320, 15,70, 15);
Debit.setText = "1542.35";
Debit.setEditable = true;
Debit.setTextLimit(8);
addTextListener(Debit);
auto Credit = new Text(line,DWT.RIGHT) ;
Credit.setBounds( 400, 15, 70, 15);
Credit.setText = "0.00";
Credit.setEditable = true;
Credit.setTextLimit(8);
addTextListener(Credit);
auto Balance = new Text(line,DWT.RIGHT) ;
Balance.setBounds( 480, 15, 90, 15);
Balance.setText = "1542.35";
Balance.setEditable = true;
Balance.setTextLimit(10) ;
//line.layout;
line.setVisible = true;
}
char values [][];
void addTextListener(Text text) {
text.addModifyListener(new class(text) ModifyListener {
Text text;
this( Text text ){ this.text = text; }
public void modifyText(ModifyEvent e){
Integer index = cast(Integer)(this.text.getData("index"));
values[index.intValue()] = this.text.getText();
Stdout.print(e); } }); }
}
↑ ↓
← → Pragma <eric.t.anderton gmail.com>
writes:
Tower Ty Wrote:
Nice new site ,quicker too ,
here is a line that you may be able to use and enhance-pretty basic though as
yet
[DWT code sample snipped]
Ya know, I don't think I'll ever get used to seeing SWT code written in D.
It's just such an eerily powerful thing.
- Pragma