GUI Problems

I have used Raspberry Pi boards and Xojo on a Macintosh, but I am new to Xojo on Raspberry Pi.

None of the programs display correctly on my Pi, including the “Sample Applications”. The “Wiring Pi” application shows buttons that are not fully drawn and partial text.

Do I need to add Xojo fonts to my Raspberry Pi?

Have you tried the latest release, 2018r2? There are some fixes in there that might solve this.
https://www.xojo.com/download/

Otherwise, we’ll need more info to help you.

What version of Xojo?
What version of Raspbian or other OS are you running on your Pi?
And best of all, a screenshot would help.

I just tried 2018r2 with the same problem. The Pi is running Raspian Stretch Lite.

Sorry, I don’t know how to attach a screen shot.

Let’s try this:

This is the same problem that happens when you design a GUI application for Linux in Mac IDE (i think windows also).

The controls must be taller in Linux.

If you design it with Linux IDE you’ll see the controls are taller to avoid this problem. It comes from Realbasic times and not solved.

Depending Linux desktop’s theme (and desktop) used seems be affected in different grades. Don’t remember if you must give 7 px more (high) to these controls. Comboboxes are always affected. Try the minimum height you must increment to avoid this.

Note i’m telling this without test it in RPi, but looks the same problem that X86 Linux.

Yes, as Jose mentioned the controls will need to be adjusted (made bigger) when designing the application on Windows and then copied to the Raspberry Pi.

This is what I have had to do with Xojo 2018r1.1 with Raspberry Pi 3 B + with the Stretch OS.

But… This is the raspberry pi demo. Shouldn’t it work with raspberry pi? I didn’t change the size of anything.

Also wondering if there is a way of running a GUI without loading a desktop. This would be for an embedded application.

If I would run a Linux virtual machine on my Mac and run Xojo on it, would the interfaces match?

If you run Linux in a VM and you design the app there, then you’ll have the right components sizes for Linux (yes, the Linux IDE takes care of this). You can add a button, check the high properties and set that to the example. You’ll see then the buttons are complete in the RPi (Or Linux) GUI.

Just acept the facts. Xojo it is doing a terrible job with the default, optimized font size and font and font size, even the default control size.

You have to make your controls bigger. And watch unsolved bugs, Combo box with large texts, Fontsize on texboxes, etc

[quote=399893:@Pedro Ivan Tellez Corella]Just acept the facts. Xojo it is doing a terrible job with the default, optimized font size and font and font size, even the default control size.

You have to make your controls bigger. And watch unsolved bugs, Combo box with large texts, Fontsize on texboxes, etc[/quote]
When you develop on a Mac, dragging a control from the Library gets you controls that are the right size for Mac. Same goes for Windows and for Linux. Until we have an autolayout engine for desktop apps there’s not much we can do about that.

FWIW, generally controls have the following heights:

Mac: 22px
Windows: 24px
Linux: 26px

This might be the right place to mention this (for Donald’s benefit).

BEWARE GROUP BOX!

Buttons placed inside a GroupBox ‘shift’ their click-area upwards about 1/2 of the control height. So if you can normally click anywhere inside a buttons bounds and register a down event, this event target area shifts to a position far above the button when placed in a GroupBox. So if you group a couple buttons on top of one another in the GUI and those buttons are in a GroupBox, you may accidentally register clicks on the wrong buttons.

Hi William,

A feedback report was made and it looks like it is fixed. My guess is for 2018 r3?

<https://xojo.com/issue/52538>

Eugene, that case say: “Release: Xojo 2018r2” so it should be included in r2. If it is not working maybe it will be good to report it again.

I see other case that say “Release: Xojo 2018r3” and was not included in r2.

Existing Ticket: 52538 - Raspberry Pi groupbox controls misplaced on Pi, good on Windows 10
(but it’s set to Closed - and I can’t request it be changed apparently)

I’ve updated that ticket with today’s notes. Hopefully that helps.

[quote=399971:@Greg O’Lone]
FWIW, generally controls have the following heights:

Mac: 22px
Windows: 24px
Linux: 26px[/quote]

Looks like buttons, check box, menu and labels default to 20px high on Mac (2018r2). Text field defaults to 22px

True. If you use the same “offsets” though, I believe it’ll still work.

OK, here’s an update. The first picture is Linux Mint running in Fusion on my Mac. The second is Raspberry Pi debug.

Is there any way to make the GUIs match?

an application i have that is built for MAC Pi and win uses a method “SetPlatformSpecific” that changes the text sizes for several controls, the default sizes on each platform is not the same, there is a recent post about this subject that gives more information as to the platform standard pixel sizes for each.

[quote=400654:@Donald Porada]OK, here’s an update. The first picture is Linux Mint running in Fusion on my Mac. The second is Raspberry Pi debug.

Is there any way to make the GUIs match?

[/quote]
By default you get the system font at the system font size. As you can see there, they are very different on Linux Mint and Raspbian so you’ll have to adjust.