public Spec(InvoiceSpec ispec, Table table, uint row) { description = new Entry(); number = new Entry(); price = new Entry(); total = new Entry(); number.Changed += new EventHandler(UpdateTotal); price.Changed += new EventHandler(UpdateTotal); total.Changed += new EventHandler(TotalChanged); number.SetUsize(NumberEntryWidth, -2); price.SetUsize(NumberEntryWidth, -2); total.SetUsize(NumberEntryWidth, -2); description.SetUsize(300, -2); table.Attach(description, 0, 1, row, row+1, AttachOptions.Expand | AttachOptions.Fill, 0, 0, 0); table.Attach(number, 1, 2, row, row+1, 0, 0, 0, 0); table.Attach(price, 2, 3, row, row+1, 0, 0, 0, 0); table.Attach(total, 3, 4, row, row+1, 0, 0, 0, 0); description.Text = ispec.beskrivning; if (ispec.antal.Length > 0) number.Text = ispec.antal; price.Text = ispec.styckpris; total.Text = ispec.belopp; }