Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 23 in printed book and digital formats -- plus a one-year subscription (beginning with 24.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are short, so hurry today and order this special bundle before the offer goes away!

Recent issues

Article Preview


Buy Now

Issue 24.1

FEATURE

Raspberry Pi Open Text File Dialog

How to Open a Text File with Dialog on Raspberry Pi

Issue: 24.1 (January/February 2026)
Author: Eugene Dakin
Author Bio: Eugene works as a Senior Oilfield Technical Specialist. He has university degrees in the disciplines of Engineering, Chemistry, Biology, Business, and a Ph.D. in Chemical Engineering. He is the author of dozens of books on Xojo available on the xdevlibrary.com website.
Article Description: No description available.
Article Length (in bytes): 7,084
Starting Page Number: 29
Article Number: 24104
Resource File(s):

Download Icon project24104.zip Updated: 2026-01-04 19:20:36

Related Link(s): None

Excerpt of article text...

This example allows the user to select a text file using a dialog, which is then opened and read (see Figure 1). The contents of the file are displayed in a TextArea control. In a previous example, a file named Text.txt was created. This demonstration expands on that by letting users choose any file to open, giving them control over where and how their work is accessed.

This example uses declares from the free Raspberry Pi Functionality Suite, Version 1.7, available on GitHub (https://github.com/eugenedakin/PiFS). Fully working code is included with this article.

When the Open button is pressed, a native GTK open file dialog appears, starting in the Desktop folder. Window1 displays whether the file was successfully opened or if the user canceled the operation.

Code 10: Save File with Dialog

Sub Pressed() Handles Pressed

...End of Excerpt. Please purchase the magazine to read the full article.