/* jquery */ /* jquery accordion style*/ /* jquery init */

From tkinter to AppJar (part 3)

In the previous tutorial, From tkinter to AppJar (part 2), we converted the file search tkinter app from an earlier tutorial to a shorter 30 line AppJar app.

This time we'll take the same file search app and add new code lines to enhance the user interface's look and feel via a series of configuration options.

With your favourite Python 3 editor open the previous file search code listing, then change the init() function to look like the listing below:

Let's take a closer look at the behaviour introduced by these new code lines.

On line 6 we create a splash screen with an appropriate text label.

On line 7 we set the background colour of the app window, in this case to orange.

On lines 8 and 9 we set the font size of the text labels and the buttons. Notice here the button font size is a little larger than the label font size.

Finally, on line 17 we ensure the "Start Path" text entry field is associated with the initial cursor focus.

You can find more information on AppJar's extensive widget collection and configuration capabilities at the official AppJar website.

Try My Free Raspberry Pi Python Coding Tutorials

1 comment:

VeggieT said...

I really wish there were more use and discussion of appJar. I'm in the unpleasant place of having started using appJar for my project, now my project has grown in scope so that I have a lot of code. Now I want to add functions and widgets that are beyond the scope of what appJar can do. And I've figured out a little bit of how to bring something like a tkinter Canvas into my program, but without good resources it's an uphill battle.