I’m brand new to Xojo (tried it on the Mac briefly years ago), and just downloaded Xojo 2020 1.2 on Win 10 64. I ran through some tutorials and scoured this site and the manual and have yet to find a way to change the appearance of a text control in any significant way (adjust borders, shadows, image backgrounds, etc). The controls I do see for buttons don’t apparently work on my version. I can’t set the transparency and/or remove the background color (though I can change it). There’s just a control for adding a border. This seems like a fine application and I remember a lot of my VB syntax so that’s not an issue. But the form display options seem rather prosaic, if I may say so. I saw an offer for an add-on called “Formatted Text Control” but it’s only for text areas evidently. If I could just get the transparency option to work I suppose I could put some graphics behind it but every text box displays a background color no matter what. I could always just match the text box background with the form color, but I’d really like to know if I’m not missing something important before I resort to kludges. Thank you.
Xojo allows you to create a cross-platform software but it mainly uses system controls in order to provide the best experience on each platform. As such, it cannot allow for more than the system itself allows.
Although it takes a bit of effort, I tend to use Canvas control and make my buttons from scratch. This can be very tedious, but if you plan ahead it’s actually pretty flexible. I subclass Canvas and crate a class for each button type. Then use Photoshop to create an Up and Depressed state. I draw text into the canvas which lets me set color, font, size, etc.
It would be nice to have better customization. I’m just happy that I found a way to make controls that appear consistent across all platforms.
Just by coincidence, I am reading about the canvas control at this very moment. You’re right. The procedure described looks tedious. But so did highlighting html buttons in the old days before css. It’s something that sometimes needs to be done. CSS3 has made me lazy. Hard to imagine a text field without a shadow and multiple border options. But what really puzzles me is why the various buttons controls (texture, gradient, transparent) don’t seem to work at all.
The good news is that all the relatively difficult stuff I usually tackle first when I look at a new language or IDE is already done. I already connected to a couple of databases and dumped output into a list box (which also has a “transparent” option that doesn’t seem to work). That’s the main thing. The rest is really window dressing (even though window dressing sells a lot of apps).
Thank you for your prompt and very useful response. There’s nothing like an active user forum when you’re researching a new product.
There’s something to be said for this. C# on VS provides way more options for controls than Xojo appears to, but they’re mostly single platform (even though C# looks pretty good on the Mac now, however circuitous it is to set up). That being said, it seems reasonable to expect that the few options offered for controls (like transparency and “gradient”) should actually work when selected. Being a noob, I’m assuming they must in some context, but I am unable to see any difference when selecting these options. I figure if I make the controls transparent then I could use background graphics of some kind to augment the lack of formatting features. Mr. Reynolds previously had the best idea, I imagine, (subclassing the Canvas control) but today it’s a little beyond my experience level.
Thank you for your input.
@friedrich_boettger — The real question here is why do you want to change the normal appearance? Do you really consider that your personal choices are really better than choices made by an army of GUI specialists and thousands of tests?
Here’s a perfect example, a product we made that has the entire GUI done in Xojo (running in RPi), if you take a look at a few of these screen shots you can see why standard buttons wouldn’t have worked in this case.
Once you get comfortable with the Canvas you’ll find you can make some very friendly buttons
…and YES, this is such a useful active and supportive forum! I could not accomplish my work without the resources of these generous people!
Re: Your linked site:
Well, that’s pretty clever, and a perfect use case, not being focused on the usual forms scenario, which is what I’m dealing with. Aside from being well laid out, with a font that’s very readable while very space-efficient, you can scroll on the right and have the topics on the left change as you scroll. How that’s done is in the realm of little elves with tiny tractors riding the scroll bars. I couldn’t think of how to do that with html and java script (it would have to be php doing a case statement with line numbers or page anchors), though some ajax wizard way smarter than me probably could. I don’t know how Xojo web servers actually work, but a lot of the code looks like desktop Basic, so there’s probably something to be said for the local screen update mechanisms used by desktop IDEs. In any case, I’d love to see Microsoft adapt such a well laid out online reference format. I can’t find anything on their site (of course, it’s probably a little bigger than your client with the pumps).
Thanks for sharing.
Are you talking about a Desktop App or Web App ?
I feel like such an idiot, the site I pointed you to wasn’t made in Xojo (which I didn’t point out), the actual product shown on that site was made with Xojo. The Touch Screen, everything is powered by a Xojo app. I was trying to point out that all the buttons and on-screen symbols are made using Canvas controls. Sorry for the confusion. But I’m glad you like the website too!
So in conclusion, the pump itself is made with Xojo
That is both confusing and impressive. Without giving away company secrets, I have to assume there’s a Pi or something in that little sucker and that you wrote not only the custom controls but the serial/control processes internally. Seems like you reinvented all four wheels and the spare tire.
Sounds like a great ad for the IDE: “I Built A Precision Laboratory Pump With Xojo”. Not your usual “Create A ToDo List With A Text File and Masking Tape” tutorial we see with most other development tools.
I’m going to assume you’d need to build custom controls for that little screen even if the Xojo form tools equaled those of C#. There’s just too much going on inside that little window.
Pretty decent showcase app, man. Thanks for the expose of what can be achieved with a little out-of-the-box thinking.
A desktop app. The appearance of the desktop tools I’ve played with (text boxes, buttons and list boxes) can’t be changed much, it seems. And the alterations offered (transparency or gradients or textures on the buttons) don’t seem to have any effect on my particular version.
These are for macOS, as it has historically had different styles of button components for different tasks. Windows buttons don’t really have the same functionality at their base, so that’s why these settings don’t work on Windows. That’s why, at least what I’m seeing in 2020r1.2, the property is named
Mac Button Style, and you can read more about that here. For what you want, you need to either:
- Dig in to the Win32 API to subclass the control’s paint events and override the drawing yourself.
- Build your own button component(s) using the Canvas as a base.
- Use products from a third-party, such as my GraffitiSuite components.
That explains it. I haven’t seen the actual description “mac button style” but it certainly makes sense.
I took a look at that Graffiti software. It looks pretty useful and polished, but my company doesn’t buy subscription software (even in the event we adopted Xojo). Too bad though. It looks like just the thing, even though I did not see a field control listed. I saw a TagField, and Field Label, but no field. The other stuff looked promising, however.
Thank you for this information. The page you linked to does say clearly that it’s not visible in the IDE (even on the Mac evidently).
Well, the great part is, you can purchase a one-year subscription and you get access to the source code and any updates for that year. You can cancel at anytime, so it can work as a one-time purchase if you so desire, then you can do the same thing again in the future should you need an update or support.
Do you mean the package one buys will keep on working after the one year if one doesn’t buy the subscription for the next year?
Correct. GraffitiSuite is a subscription for access to, license to use, and support. Once you have subscribed, you are free to indefinitely use any releases made available during your subscription period for the number of developers covered by your subscription. GraffitiSuite doesn’t require you to use any registration code within your app, does not time lock your apps, and there are no per-app distribution fees. You subscribe for the number of developers you need, and you’re good to go until the sub ends.