dallaswhe.blogg.se

Cara merubah tampilan inject borland delphi 7
Cara merubah tampilan inject borland delphi 7





cara merubah tampilan inject borland delphi 7 cara merubah tampilan inject borland delphi 7

If not (Key in ) thenĮlse if ((Key = DecimalSeparator) or (Key = '-')) and Procedure TForm1.Edit1KeyPress(Sender: TObject var Key: Char) ShowMessage('Invalid Key: twice ' + Key) Īnd here's a full blown version of the event handler, accepting a decimal separator and negative numbers (minus sign: only accepted once, has to be the first character): For an international version that looks at the correct decimal separator, the code could be as follows: procedure TForm1.Edit1KeyPress(Sender: TObject var Key: Char) If you also want numbers with a decimal fraction, you must allow a POINT or a COMMA, but only once. The code for the OnKeyPress event handler is as follows: procedure TForm1.Edit1KeyPress(Sender: TObject var Key: Char) Let's assume that you only want to allow positive integer numbers.

cara merubah tampilan inject borland delphi 7

If you want to limit the input of a TEdit to numerical strings only, you can discard the "invalid" characters in its OnKeyPress event handler. Items ), Rect, DT_VCENTER +DT_SINGLELINE ) Top ) ĭrawText (handle, PChar (ComboBox. ComboBox1DrawItem (Control : TWinControl Index : Integer Rect : TRect State : TOwnerDrawState ) Procedure ComboBox1DrawItem (Control : TWinControl Index : Integer Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ,







Cara merubah tampilan inject borland delphi 7