Re: LazGUI
- Posted by jmduro Feb 15, 2016
- 1752 views
I have uploaded a new version. Now a component is created by sending a JSON description to the server with any additional property (not method): integer, string or boolean up to now.
object data = send_command(socketT, "{\"create\":{" & "\"class\":\"TButton\"," & "\"Left\":10," & "\"Top\":20," & "\"Width\":80," & "\"Height\":25," & "\"Caption\":\"OK\"," & "\"Visible\":true}" & "}" )
It shows only a button for now because component creation and naming is the only part of the Lazarus code that is not generic, but as you can see below, it is really not complicated to add more widgets.
if widget_class = 'TButton' then begin Form1.ControlList.Add (TButton.Create(Form1)); TWinControl(Form1.ControlList[Form1.ControlList.Count-1]).Name := 'Button'+IntToStr(Form1.ControlList.Count); end;
Yet events are logged in a file. Next step is to send them to the Euphoria client via Telnet.
Jean-Marc