Jump to content

Custom Controls


Guest

Recommended Posts

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.

.

 

Link to comment
Share on other sites

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

 

 

.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...