There are three multiline edit text box sle_sl, sle_dj, sle_je , respectively, quantity, unit price, amount is how to make the amount of text box is equal to the unit price. Text * number. The text
CodePudding user response:
Do this very fresh, but can realize: Define three instance variables: dec i_1, i_2, i_3 In the first modified sle_sl write I_1=dec (this text) Sle_dj. Setfocus () In the second sle_dj modified write I_2=dec (this text) I_3=i_1 * i_2 Sle_je. Text=string (i_3, '00. # # #')
CodePudding user response:
When computing is a problem, than the input number first, then input the unit price, here, there are other operations, to calculate, Another modified only after the input enter triggered, there seems to be a event can be in when the input can be calculated, remember not too clear, you check, Get to each value of the text box, and then according to your requirement is ok,