Guest Posted October 17, 2010 Posted October 17, 2010 Message from: "Charles McAllister" Is it possible, and is there an example of writing custom controls subclassed from UniGUI controls? For example, I'd like to make a TUniButton descendant that would keep the OnClick event for use on the form, but override Click for internal use. I would need the Click method to execute some other server-side code. Thanks for help. . Quote
Guest Posted October 18, 2010 Author Posted October 18, 2010 Message from: "Farshad Mohajeri" "Charles McAllister" . > Is it possible, and is there an example of writing custom controls > subclassed from UniGUI controls? > > For example, I'd like to make a TUniButton descendant that would keep the > OnClick event for use on the form, but override Click for internal use. > I would need the Click method to execute some other server-side code. > > Thanks for help. Charles, Creating custom controls derived from unigui existing controls is possible. Well, it is not as straigthforward as regular VCL because you have VCL side and Web side which both must be kept in mind. Adding a new features to TUniButton doesn't guarentee that this feature will be available in Web too. It all depends on what is being extended from existing functionality or the new futures are being added. The mechanism behind uniGUI component system is kinda complex and can be confusing at first glance. This complexity is the price you pay for such high level of abstraction which at end makes creating web apps easier and faster than ever. Currently, I'm in pursuit of a way to reduce this complexity to a more reasonable level. That's why I have delayed custom control development till now. As soon as I'm done with changing the underlying component system, I'll be ready to publish the receipt to create custom controls. Until then the core component system may go under some radical changes so any custom control developed using current version of library maybe totally unusable when framework changes in future version. Of course, I will try to not to break backward complatibility. i.e. a TUniButton will always be a TUniButton regardless of internal changes. I think with version 0.85.0 we will have the final version of core library which will remain intact for all future versions. regards, Farshad Mohajeri . Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.