Categories
linux python Tk

Tkinter Application with login form

Hooray this is my first python post !

Here i want to share a tkinter based application on python 3 with login form. If user is logging in by clicked a login button then login form will disappear and main form will show up. This code is not connected to database yet ! Only playing with 2 toplevel tk window placement and control its state.

Donwload py source code below.

tk_login_app

Categories
tcl Tk

2nd Update : My First Tcl/Tk Application

Tonight i just want to implement searching note by keyword, and its done. Download source code below.

notes_update2

May be this will be the final update for the application.

Execute it using wish not tclsh …

Categories
tcl Tk

Update : My First Tcl/Tk Application

The notes application now is more sophisticated : can add note and  browse note by note id. Search by keyword still a to do task but its give a lot of experience coding in tcl/tk.

Download source code here

notes_sqlite3_update1

Categories
tcl Tk

My first Tcl/Tk Application

Warning still in progress and still learning how to code tcl/tk.

Extract and execute using wish notes_sqlite3.tcl

Download source code here

Categories
tcl Tk

Tcl/Tk : Another hello world

Hello world using tcl/tk presented below may be more clear than oneliner before.

  1. create a label named .label1 with hello world text
  2. create a button named .button1 with OK text and will do exit when clicked.
  3. pack .label1 to make it showed on screen.
  4. pack .button1 to make it showed on screen below .label1.

Here is the result.

Done.

Categories
tcl Tk

Tcl/Tk Hello world in a line

Creating classic hello world program using GUI in Tcl/Tk can be done in few lines or may be only a line !

Oneliner can do below.

pack [button .b1 -text “Hello World” -command exit -width 50]

This line can be read : pack a button named .b1 with hello world text and exit command when clicked.

Save it to hello_oneline.tcl then run on command prompt : wish hello_oneline.tcl.

Voila!

Click the button and the window will close.

Bye ..

Categories
OpenBSD postgresql sqlite3 tcl Tk

Installing TCL on OpenBSD 6.6

To bring tcl/tk programming language and some database connectivity for tcl on OpenBSD do command below as root :

pkg_add tcl tk sqlite3-tcl pgtcl

OpenBSD 6.6 can install tcl/tk 8.5 and 8.6.

Two extra package named sqlite3-tcl and pgtcl will give tcl capability to work with sqlite3 database and postgresql database.

Tdbc also a good choice for database connectivity. Tdbc packages on OpenBSD available for mysql, postgres, sqlite3. To add tdbc , we can do pkg_add tdbc-postgres tdbc-mysql tdbc-sqlite3.

Later will write more about tcl/tk.