customize controls events

hi, please help me
i want to customize some control like tedit, tlistview, and more
what i need to know is, how do i know what procedure called during an event of the control. for example i know onExit trigger doExit so i just need to declare *procedure DoExit; override;*
how do i know what procedure will be called if i want to change the behavior of the control on specific event, i've been looking for the list but there is no satisfying documentation on this.
for example i search doExit on help, i found the onExit in _see also_ section. but if i open the onExit docs, there is no doExit word. can you understand what i mean? and could you guys help me?

thank you
0
Conan
8/28/2014 8:32:55 AM
public.delphi.vcl.writing 510 articles. 0 followers. Follow

5 Replies
492 Views

Similar Articles

[PageSpeed] 38

Conan Edo wrote:

> hi, please help me
> i want to customize some control like tedit, tlistview, and more
> what i need to know is, how do i know what procedure called during an event of the control. for
> example i know onExit trigger doExit so i just need to declare *procedure DoExit; override;* how
> do i know what procedure will be called if i want to change the behavior of the control on
> specific event, i've been looking for the list but there is no satisfying documentation on this.
> for example i search doExit on help, i found the onExit in _see also_ section. but if i open the
> onExit docs, there is no doExit word. can you understand what i mean? and could you guys help me?
> 
> thank you

Hi Conan,
There's no doc on which method calls the OnXXX procedures but the scheme is rather clear, jus
replace 'On' with 'Do' as a general rule.
But it is easy to see in the debugger the whole chain that leads up to an event handler.
Make sure you have 'Use debug dcus' set in project options.
Define an OnXXX handler for each event you are interested in.
Put a break point in the event handler.
Run and activate the event.
In the call stack you see something like
{code}
Unit4.TForm4.Edit1Exit($1E546C0)
Vcl.Controls.TWinControl.DoExit
Vcl.Controls.TWinControl.CMExit(???)
Vcl.StdCtrls.TCustomEdit.CMExit((45083, (), (0, 0, 0, 0), (), (), 0))
Vcl.Controls.TControl.WndProc((45083, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
Vcl.Controls.TWinControl.WndProc((45083, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
Vcl.Controls.TWinControl.MainWndProc(???)
System.Classes.StdWndProc(4065366,45083,0,0)
....
{code}
Double clicking these lines takes you to the actual source code

-- 
Tom Brunberg
firstname.lastname@welho.com
0
Tom
8/28/2014 9:35:12 AM
perfect thank youuu....

> {quote:title=Tom Brunberg wrote:}{quote}
> Conan Edo wrote:
> 
> > hi, please help me
> > i want to customize some control like tedit, tlistview, and more
> > what i need to know is, how do i know what procedure called during an event of the control. for
> > example i know onExit trigger doExit so i just need to declare *procedure DoExit; override;* how
> > do i know what procedure will be called if i want to change the behavior of the control on
> > specific event, i've been looking for the list but there is no satisfying documentation on this.
> > for example i search doExit on help, i found the onExit in _see also_ section. but if i open the
> > onExit docs, there is no doExit word. can you understand what i mean? and could you guys help me?
> > 
> > thank you
> 
> Hi Conan,
> There's no doc on which method calls the OnXXX procedures but the scheme is rather clear, jus
> replace 'On' with 'Do' as a general rule.
> But it is easy to see in the debugger the whole chain that leads up to an event handler.
> Make sure you have 'Use debug dcus' set in project options.
> Define an OnXXX handler for each event you are interested in.
> Put a break point in the event handler.
> Run and activate the event.
> In the call stack you see something like
> {code}
> Unit4.TForm4.Edit1Exit($1E546C0)
> Vcl.Controls.TWinControl.DoExit
> Vcl.Controls.TWinControl.CMExit(???)
> Vcl.StdCtrls.TCustomEdit.CMExit((45083, (), (0, 0, 0, 0), (), (), 0))
> Vcl.Controls.TControl.WndProc((45083, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
> Vcl.Controls.TWinControl.WndProc((45083, 0, 0, 0, 0, 0, (), 0, 0, (), 0, 0, ()))
> Vcl.Controls.TWinControl.MainWndProc(???)
> System.Classes.StdWndProc(4065366,45083,0,0)
> ...
> {code}
> Double clicking these lines takes you to the actual source code
> 
> -- 
> Tom Brunberg
> firstname.lastname@welho.com
0
Conan
8/29/2014 3:01:20 AM
and why i can't give stars anymore, where is the stars button moved? :D

> {quote:title=Conan Edo wrote:}{quote}
> hi, please help me
> i want to customize some control like tedit, tlistview, and more
> what i need to know is, how do i know what procedure called during an event of the control. for example i know onExit trigger doExit so i just need to declare *procedure DoExit; override;*
> how do i know what procedure will be called if i want to change the behavior of the control on specific event, i've been looking for the list but there is no satisfying documentation on this.
> for example i search doExit on help, i found the onExit in _see also_ section. but if i open the onExit docs, there is no doExit word. can you understand what i mean? and could you guys help me?
> 
> thank you
0
Conan
8/29/2014 3:10:19 AM
Conan Edo wrote:

> and why i can't give stars anymore, where is the stars button moved? :D

You did not tick the checkbox 'Mark this as a question.....' when you started the thread. Only
answers to questions can be rewarded.


-- 
Tom Brunberg
firstname.lastname@welho.com
0
Tom
8/29/2014 4:54:41 AM
i see....sorry i cannot reward you for helping me :P maybe next time
thank you again

> {quote:title=Tom Brunberg wrote:}{quote}
> Conan Edo wrote:
> 
> > and why i can't give stars anymore, where is the stars button moved? :D
> 
> You did not tick the checkbox 'Mark this as a question.....' when you started the thread. Only
> answers to questions can be rewarded.
> 
> 
> -- 
> Tom Brunberg
> firstname.lastname@welho.com
0
Conan
9/1/2014 12:52:37 AM
Reply:

Similar Artilces:

Dynamic custom control on custom control
What I'm trying to do is create a module for use within a larger page.  The page itself is an order form, which will have typical payment info (address, credit card, etc.), and the ability to select what you are paying for.  Our clients will have several options in how they want the page setup.  They can either have a single form, or they can have each module on it's own page.  They can also have all the selected items fire in a single transaction, or have a seperate transaction for each item selected.  And they can limit the total number of transactions a person can...

Custom Control to Custom Control communication using event delegate mech.
I have a custom control “AddressPicker” that displays dynamic address information of a user. BY dynamic I mean based on the database call it checks how may addresses a user has and it displays it. There is a “Use this Address” button at the bottom of each address information which is generated dynamically too as a part of CreateChildControl. If a user click on this button I need to pass this information to another custom control namely “AddressConsumer” which in turn uses this information for further processing.My Controls are inherited WebCOntrol,INamingContainer I am using the event deleg...

problems listenening to events on a custom server control from another custom server control
 Hi all,I am having problems listening to events on one of custom server controls(AddBookmark) from another custom server control(BookmarkList). The listener or the BookmarkList control has a property that can be set to the AddBookmark control (string at design but the reference is obtained at run-time). I am able to get a reference to the AddBookmark control and add a listener to it on the BookmarkList control on the OnPrender of BookmarkList. But the problem is that when the events on AddBookmark gets fired, the listener added from the BookmarkList is no longer present and the listene...

Custom Events in Custom Server Control
 Hi There I've created a custom server control. I have extended it by adding my own event which fires in one of the aggregated control's event handlers. My probelms is that I would like to be able to specify the event handler for the event from the aspx file as a tag attribute.Does anyone know how to link the attribute of a customer server control tag in the aspx file to a custom event in the class source for the control?   I've done this several times with Custom Controls.  All I do is declare the event in the CustomControl's class public...

Custom event for Custom server control
  Hi All, I have a custom server control (Multi selection drop downlist). This control contains AspxEditButton control(which is like textbox with button), check box list control and panel.I have to display all selected values in AspxEditButton at control is leaving that panel. How can i create LostFocus event for panel . Please anyone help meRegards, Anu All I can think of, is that there is a javascript "onblur" you could look into, maybe you could use some AJAX techniques to make that JavaScript event fire a server side ev...

write date and time on post-build-event for a custom server control for ASP.NET
All -- Does anyone know how to write the date and time on post-build-event for a custom server control for ASP.NET to the output window? Just putting the DOS command... date ...or... time ...does not seem to work. Do you know? Please advise. Thank you. -- Mark Kamoskihttp://www.NetBrainer.com...

Custom web control and child control events
I generate a LinkButtons in a CreateChildControls() method of a custom web control and I want to catch click events of these LinkButtons in this custom web control class (in some method). Is it possible? Martin public class ExampleCompositeControl { public override ControlCollection Controls { get { EnsureChildControls(); return base.Controls; } } protected override void CreateChildControls() { this.Controls.Clear(); myLink = new LinkButton(); myLink.Click += new EventHandler( myLink_Click ); this.Controls.Add( myLink ); ...

Trouble writing events to custom event logs
Hello all,I have created two custom event logs for my ASP .NET web applications.  For now, let's call them Log A and Log B.  For some reason, whenever one of my programs writes an error to Log A, the error will show up in both Log A and Log B.If I try to write an error to Log A, the error will show up in Log A as it should, with the proper description :Description :This error should appear in Log A.However, it will also show up in Log B, with a description that looks like this :Description:The description for Event ID ( 0 ) in Source ( MySource ) cannot be found. The local computer...

handling events for controls in custom server control
Hi,     I am having a problem in using server controls in ASP.Net, with C#.  I am trying to create a server control which contains 2 other server controls that I created (Called MyImageButton).  MyImageButton extends the standard ImageButton with some other properties & methods that I needed.  It therefore also has the 'OnClick' event.  From the original server control, I would like to handle the Click event for these 2 image buttons in the same server control.  Basically, this server control will show 2 images, ascending and descendin...

Handling events from controls within custom controls
Hi, I have created a custom control that behaves similar to a placeholder control. In the Render control I simply render the sub-controls that have been programiatically added, like this: protected override void Render(HtmlTextWriter writer){    foreach (Control control in Controls)    {        control.RenderControl(writer);    } ... This is fine. I can programatically add a button with an event handler to this control in the code behind for my ASPX page, and it works with no problem. However, if I add a...

Register Events on Control inside Custom Server Control
 I have some dynamically generated LinkButtons inside my custom server control. I never know how many there are going to end up being. I need to bind a 'Command' event to these. I understand that this nieeds to be done in the controls 'OnInit' event. I need to also add items to my server control dynamically in a pages codebehind, which will, in turn, dynamically create more linkbuttons. I'm having trouble keeping both these functionalities in one, as the OnInit event of the server control occurs before the page_Init event of my ASP.Net page.Here's the code of my ...

problem: custom control receives postback events for other controls
Hi all, I've created numerous custom controls of varying complexity, but I've been on this problem for a day and a half, and I can't figure this mystery out. I hope one of you kind folks can point out the really obvious and stupid thing I'm overlooking here. :) I have a custom control that provides a tasklist similar to what you get in certain parts of Office. On the client it consists of a bunch of nested, named and id'ed divs with onclick event handlers wired to call __doPostBack with the control's server-side ID and a task name and task Id as arguments (example for a control named T...

How do u wire up events to controls in a custom template control?
I have a very basic custom control that exposes an ITemplate property and everything seems pretty straight forward so far. But, when I put other server controls into the template section of my custom control in the ASPX page: <cc1:MyCustomControl id=MyCustomControl1 runat="server"> <MyTemplate> <asp:listbox id=ListBox1 runat="server" AutoPostBack="True"></asp:listbox> </MyTemplate> </cc1:MyCustomControl> .... how am I suppose to programatically access ListBox1 from the ASPX's code behind? I r...

Event not firing with Dynamic Controls in a Custom Web Control
I'm creating some LinkButtons on the fly (on Load) and they show up just fine.  The problem is that the AddHandler event I created is not firing.  I'm at a loss...have read a ton of articles today, but just can't figure this one out.  Please help a newb! :-)Protected Overrides Sub OnLoad(ByVal e As System.EventArgs) MyBase.OnLoad(e) EnsureChildControls() If Me.Page.IsPostBack Then Me.Units = Me.rblUnits.SelectedValue 'If there is text in the txtSearch TextBox, then search for the new loc...

Regular control does not fire event when it is placed in custom control.
Hi, i have created custom control which contains Login control and one label.I programmatically added custom control to PlaceHolder which is in an UpdatePanel. When i click on menu item that custom control should appear in PlaceHolder control. Since that is basically login control, it should log an user when that user enters username and password. When i click on Log in button, all i get is that my default page is opened, which shows menu item.  What should i do so i can use Login control as it was out of custom control? EnterSB: Hi, i have created custom control which contains Lo...

Web resources about - customize controls events - public.delphi.vcl.writing

IPhone App Gabi Lets Users Customize Their Facebook News Feeds
iPhone users who want a different way of catching up with their Facebook news feeds have a new option in the form of Gabi , a $0.99 application ...

Facebook allows advertisers to customize headlines for page, app and event ads
Facebook will now let advertisers customize the headlines of their ads within the sidebar. This will be available via the API, Power Editor and ...

Battery Tips! Free! ~ monitor battery power level & health status with customize wallpaper and battery ...
Get Battery Tips! Free! ~ monitor battery power level & health status with customize wallpaper and battery theme feature on the App Store. See ...

Bloglines: Customize Start Page - Flickr - Photo Sharing!
Explore Tamar Weinberg's photos on Flickr. Tamar Weinberg has uploaded 4087 photos to Flickr.

[Jailbreak Advice] Sticker - Manually Dismiss / Customize Banners - YouTube
Sticker is available for $0.99 via the BigBoss Repository Follow me on Twitter: http://www.twitter.com/macmixing Like my Facebook page: http ...

Millennials push fast food industry to customize their meals
Millennials, it seems, want their food quick and customized and they are finding it with a new breed of restaurant called 'Fast Casual'. Today, ...

Hangouts now lets you customize who can contact you directly
Hangouts, since the beginning, has separated incoming messages into two categories. Either the app detects that you probably know the person ...

iOS 8 How-to: Customize and disable the contacts section in the multitasking interface
... thumbnail For more information about Apps , iOS 8 , and How-To continue reading at 9to5Mac . What do you think? Discuss "iOS 8 How-to: Customize ...

Customize Windows 10's Start menu with these third-party apps
Microsoft’s operating systems have always been easy to customize, and Windows 10 is no exception. We’ve already shown you how to make changes ...

How Emory Porsche Customizes Incredible Vintage Porsche 356s
Some view these new/old hybrids as heresy, but once you get behind the wheel of a souped-up piece of history, it's hard to argue with Rod Emory's ...

Resources last updated: 12/28/2015 4:00:27 PM