본문 바로가기

Delphi Tip/컴포넌트25

TXMLDocument를 이용한 XML로딩방법 TXMLDocument를 이용한 XML로딩방법 procedure TForm1.Button1Click(Sender: TObject); Var XMLDoc : TXMLDocument; ChildNode : IXMLNode; I, J , N : Integer; begin XMLDoc := TXMLDocument.Create(Application); XMLDoc.LoadFromFile('C:\Test.Xml'); XMLDoc.Active := True; if XMLDoc.ChildNodes.First = nil then Begin Exit; End; For I := 0 To XMLDoc.DocumentElement.ChildNodes.count - 1 Do Begin ChildNode := XMLDoc.Docu.. 2021. 11. 1.
TList 활용하기 TList활용하기 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TMyData=record SAW_CODE:String; FName:String; end; MyData=^TMyData; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TC.. 2021. 10. 29.
TEdit 다음 포커스 이동하기 TEdit 다음 포커스 이동하기 if key = #13 then SelectNext(Activecontrol, True, True); 2021. 10. 28.
TEdit 숫자만 입력받기 TEdit 숫자만 입력받기 procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin // #8 is Backspace if not (Key in [#8, '0'..'9']) then begin ShowMessage('Invalid key'); // Discard the key Key := #0; end; end; If you also want numbers with a decimal fraction, you must allow a POINT or a COMMA, but only once. For an international version that looks at the correct decimal separator, he code co.. 2021. 10. 27.
TdateEdit 날짜 요일 구하기 TdateEdit 날짜 요일 구하기 Web.HTTPApp uses추가 DateToLongDateStr(DateEdit1.Date); 이전버전은 DayofWeek 사용 0일,1월,2화,3수,4목,5금,6토,7일 2021. 10. 26.