AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Xojo properties11/20/2023 If you change the value of prop in the class to 2 and drop a new instance onto the window then it still has a value of 1, as do the existing ones (unexpected) If you ADD a new integer property prop and give it a default value of 1 then ALL the instances - even the ones you dropped onto the window BEFORE you added the property - have that property with a default value of 1. If you drop an instance of a class onto a window then it keeps the properties that it has AT THAT MOMENT even if you change the property value in the class. I do think that inheritance of properties in subclassed objects should be implemented differently, but I suppose thats a debate that I cant win if Xojo has fundamentally designed their product this way. Im so excited about diving into Xojo and there is so much you can do with it, and more than I could do in FoxPro. I like that I can change the DEFAULT properties of a subclassed object - I just wish that we could at least change the default at a later time and have the option to propagate that change to objects based on that class everywhere in the project. For example, lets say I want a subclassed button to look a certain way and I drop that button 10 different places, but if there are customizations I want to make to a few of those buttons, I simply override a property (say font colour) on two individual buttons on a form. In FoxPro, you could override any property in subclasses. IMO, if you want to subclass a button or label to look a certain way (say with green text) and you drop that onto a number of windows in a project, and the client changes his mind and prefers red text, I should be able to change that in one place - the subclassed object. I only know that FoxPro handled inheritance differently and I preferred their approach. Im not sure if Xojo honours OO principles or not in this case. I just needed to know Xojos methodology. ![]() This example sets the control's TabIndex.I appreciate your opinions/facts/perspective. The control with a TabIndex of 0 is the first WebUIControl to get the focus when the page opens in the browser. The WebUIControl's control's position in the Tab Order. If it is on a WebPage, it returns the WebPage. If the parent control is a WebContainer, then it returns the WebContainer. Used to get the control's parent control or page. Identifies the web page that contains the control. It allows you to proportionally lock a control's position to keep it centered within the parent control or web page.įor example, if you place a control in the center of the page, and sets both LockHorizontal and LockVertical, the control will stay in the center of the page. LockVertical overrides LockTop and LockBottom. It allows you to proportionally lock a control's position to the center of its parent control (or web page).įor example, if you place a control in the center of the page and sets both LockHorizontal and LockVertical, the control will stay in the center of the page.ĭetermines whether the left edge of the control should stay at a set distance from the left edge of the parent control, if there is one, or the owning web page.ĭetermines whether the right edge of the control should stay at a set distance from the right edge of the parent control, if there is one, or the owning web page.ĭetermines whether the top edge of the control should stay at a set distance from the top edge of the parent control, if there is one, or the owning web page. LockHorizontal overrides LockLeft and LockRight. ![]() ![]() The position of the left side of the WebUIControl in pixels, relative to the web page.ĭetermines whether the bottom edge of the control should stay at a set distance from the bottom edge of the parent control, if there is one, or the owning web page.
0 Comments
Read More
Leave a Reply. |