Use the Inspector panel to change the following properties:Īdd a new property to the BaseContainer subclass in the Navigator (use the contextual menu for that), setting the following values in the Inspector panel:Ģ. Double click on the Container in the Library so it is added to the Navigator in the IDE. Open Xojo and create a new Desktop project. Plus we’ll make them adjust as the size of the Container changes like you see in this example below. In order to see how this works, this example creates a Desktop project that includes multiple DesktopButton instances at runtime while also removing them from the target DesktopContainer (calling the Close method on the instance to do that). These values are relative to the left/top corner of the target window/container, so a value of top = 0 and left = 0 means to add the control at the top/left corner of the target window itself. To make the new DesktopUIControl instance really visible in the target window or container, you’ll need to set some basic properties specifically the desired width and height values for the new instance control and also the left and top coordinate values where you expect the control to be added. The new AddControl method on DesktopWindow and DesktopContainer accepts any DesktopUIControl instance you want to add to a window or container. Continue reading and I will show you how! Instead of having to deal with control arrays, when you use Xojo 2021r3 or later you can call the new AddControl method on the DesktopWindow (or DesktopContainer) where you want to add the new control. That’s a keeper.The process of adding new controls to windows (or containers) at runtime has been greatly simplified. I love the language but I am not happy with the forms on either web or desktop. This is overkill for my extremely prosaic needs (basically I want every control transparent and borderless) but this looks like a great example of what Xojo should have in its form toolkit. Thank you for referencing your Graffiti styles, which I’ve seen many times before in my search for controls. Extending anything like that paradigm to Xojo, however, seems fruitless. I have no trouble adding a stylesheet to an html web page or applying individual styles to html elements. Basically, I’m unfamiliar with the terminology (webstyles and themes) and don’t know how to use stylesheets in Xojo so a lot of what seems intuitive to you is kind of lost on me. I’m going from the forum posts of others. I don’t really know how well the old procedures work(ed). This seems to work fine when the documented uses of background-color do not. I had some luck doing borders in individual controls, but this value syntax you stuck in your reply is a little goldmine. I don’t want to use bootstrap anyway (ditto for my other web projects in php) so I tried to reference my own css stylesheet, and embed my own inline styles, to no avail. I should have probably mentioned that I’m a noob with Xojo web (though I’ve lurked about in these forums for awhile) and once I got the bootstrap into Xojo I didn’t know how to reference it. It’s just that the changes are hard to follow if someone at the company is not disseminating the requisite information to the community as quickly as the changes are being made.Īssuming I’m missing something, if someone could point me to a current article or two, I’d appreciate it. Not that it’s a bad idea to update your programming paradigm. From my dim understanding to date, this Web 2.0 thing seems to have broken at least as many things as it has fixed. In my opinion, it’s probably time for someone to write an updated and hopefully really detailed tutorial on exactly how to style a webpage in CSS. ![]() I’ve read several tutorials on the forum all the way back to 2015 on how to use CSS in Xojo, but some of these features seem to have been deprecated. ![]() What is a “Xojo-Webstyle-control” and where do I find one? So, how do I name and create a “webstyle”. I’ve tried to apply a class to it, but I see no result. I don’t know if I can write a definition for an input tag in CSS and have it apply to a text box in Xojo. There is a thing called a “theme” that we can supposedly implement and call by name, but I see no concrete (understandable by me) example of how to do this (I know what a “theme” is in terms of bootstrap or another CSS framework, but I don’t know how to apply it here). Still, I can only define some styling in the “Opening” event of controls. I’ve also created individual style entries in that HTML header box. I have a stylesheet attached to my app object. I know CSS, but obviously the methodology is different here. Judging by my reading on this forum, I’m not the only one flummoxed by Xojo’s implementation and/or explanation of css styling for the web apps.
0 Comments
Leave a Reply. |