skoro / php-tkui

Build native desktop applications with PHP only

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Tk versus other widget libraries

the-liquid-metal opened this issue · comments

I'm new to desktop php. I'm surveying which libraries are suitable for my needs. my needs are relatively simple. I also found libraries that can work with PHP: Gtk and WxWidget, but both seem to be less updated. can you help me compare between Tk with Gtk and WxWidget? Some things I'm considering are:

  1. simplicity of code.

  2. widget diversity. widgets don't have to be sophisticated, but varied enough.

  3. small library size, small number of files, and small memory consumption.

I found the statement:
WINDOWS_LIB_TCL=c:\tcltk\bin\tcl86t.dll

my question is: is tcl also needed for tk to work?

Hi @the-liquid-metal ,
Well, I will try to answer your questions but firstly, I have to mention that the library should be considered as alpha and still on development so api can be changed in some way. I also have never worked with gtk and wxwidget so I won't compare the library against them.

  1. simplicity of code - since there is no documentation yet, so you can take a look at the demos folder to have understanding how to develop your ui with the library.
  2. widget diversity - basic widgets have been implemented: button, listbox, combobox (dropdown), entry (textinput), an application menu, message boxes, tabs, progressbar, textarea, treeview (only list mode). Bultin themes are supported, the canvas widget and treeview as a tree are not yet implemented.
  3. small library size, small number of files, and small memory consumption. - regarding to the library size: except the library package itself, you also need the tcl/tk binary files, the archive is about 3Mb (compiled version is in tools folder. The memory consumption on the demos is quite small and much-much lesser than electron apps )

my question is: is tcl also needed for tk to work?

Tk is just graphical ui toolkit for Tcl and it cannot be used without Tcl, so yes, tcl is required.