كيف يمكن جعل الناتج يكون رقمين بعد الفاصلة 0.00
#4
تفضل جرب هدا
كود :
if Edit1.SelStart in [1 .. 5] then if not(Key in ['0' .. '9', '.', #8]) then begin Key := #0; Exit; end; if Pos('.', Edit1.Text) > 0 then if (Length(Edit1.Text) - (Pos('.', Edit1.Text)) = 2) and (Key <> #8) then Key := #0; if Key = '.' then if Pos('.', Edit1.Text) > 0 then Key := #0 else if (Key = '.') and (Edit1.SelStart = 1) then Edit1.Text := Edit1.Text + '0'; Edit1.SelStart := Length(Edit1.Text);
الرد


الردود في هذا الموضوع
كيف يمكن جعل الناتج يكون رقمين بعد الفاصلة 0.00 - بواسطة snake - 17-05-2014, 09:13 AM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم