Frame notifies parent

Howdy
I have a form which uses a frame to display check boxes, etc. When the user clicks a check box, I would like the parent to be notified so I can adjust some buttons, etc.. I don't see any way of the onChange event notifiying the parent. Is there such a way?
Thanks
Douglas
0
Doulgas
7/15/2015 7:02:21 PM
embarcadero.delphi.general 4258 articles. 0 followers. Follow

2 Replies
756 Views

Similar Articles

[PageSpeed] 52

Doulgas wrote:

> I have a form which uses a frame to display check boxes, etc. When
> the user clicks a check box, I would like the parent to be notified so I
> can adjust some buttons, etc.. I don't see any way of the onChange
> event notifiying the parent. Is there such a way?

Define your own event in the Frame class.  Assign a handler to the CheckBox's 
OnChange event, and have it call the Frame's event handler if one is assigned.

{code}
type
  TMyFrame = class(TFrame)
    CheckBox: TCheckBox;
    procedure CheckBoxChange(Sender: TSender);
  private
    FOnChange: TNotifyEvent;
  published
    property OnChange: TNotifyEvent read FOnChange write FOnChange;
  end;

procedure TMyFrame.CheckBoxChange(Sender: TSender);
begin
  if Assigned(FOnChange) then FOnChange(Self);
end;
{code}

The parent Form can then assign an event handler when it creates the Frame:

{code}
procedure TMyForm.FormCreate(Sender: TObject);
begin
  // ...
  Frame := TMyFrame.Create(Self);
  Frame.Parent := ...;
  Frame.OnChange := FrameChange;
  // ...
end;

procedure TMyForm.FrameChange(Sender: TObject);
begin
  // adjust buttons as needed ...
end;
{code}

-- 
Remy Lebeau (TeamB)
0
Remy
7/15/2015 7:42:28 PM
Thanks, Remy
0
Doulgas
7/15/2015 7:57:03 PM
Reply:

Similar Artilces:

closing parent frame from child frame
Using the powersite object model, I would like to close the parent frame that opened a child frame subwindow before re-opening the parent frame again, from the child - I am passing parameters to powersite server script in the parent frame. If I open the child frame using the window.open() ( I am guessing this is best so the opener property exists), is it possible to close the parent frame from a child frame and then re-open the parent frame?, and if so, any suggestions or advice on how to do it would be greatly appreciated. Thanks Marc I've not closed a parent frame, b...

Better way to do Parent.Parent.Parent.Parent....
I want to find a tabstrip on the page, then hide a couple of them.  Seems like it takes 5 or 6 .Parents to get to the node with the control before I can do a FindControl  Is there a better way to do this? Hi, You can try implementing a Recursive FindControl method that will drills into child controls in  Page. Regards,Vinz"Code, Beer and Music" that's my way of being a programmer!How to get your Forum Question Answered | Blog | CodeASP.NET  You could do something a bit more elegant using an extension method like this:  public static class...

frame or no frame
I've read through quite a bit of opinions, but without a definate answer. I'm writing a page in asp.net 2.0 and it includes a seperate page hosted on a seperate domain.  I was going to just throw it in a frame and call it good, but I'm reading that that is not such a good idea.  Anyone have a simple way to do this, I'd like to use the master page for the site and just have an area that is framed.  Sorry if I am missing something obvious, I tend to do that lately.   You have two ways to do it.   If you own the second domain, or can ask the owner nicely, set up t...

Stack overflow when opening a Delphi 7 frame in Delphi XE4
I am trying to port a Delphi 7 application to Delphi XE4. I have installed all the required component libraries in Delphi XE4 and I managed to open the Delphi 7 project in Delphi XE4. However, when I try to open one of the units containing a VCL frame I get the error "stack overflow - Save your work and restart RAD studio XE4". If I don't open any frames and try to build the project, the compiler can't find the components in the above mentioned frame unit and stops with an error. What should I do? Pier I figured out what the problem was. I has a TsiLang compo...

Parent of the parent
Hey guys, How can I trigger events on the parentwindow of the parentwindow ... ? I know that it has to do something with : lw_parent = n_pass_data.of_get_parent_sheet() And then lw_parent.of_get_parent_sheet() Or something like that ... I hope someone can help me ... Thnx in advance, Greetz Bart ! First step is to get the window you are on. If you've got PFC, or can install it with the custom installation, look at of_GetParent() on most (all?) visual user objects in the PFC layer, like pfc_u_dw. It basically does GetParent() in a loop until it finds one of t...

To frame or not to frame...
I know this is probably a matter of opinion...but if you have an application that is using large datasets that can not be cached, does it make sense to use frames on your site to save some processing of other database driven menus, and whatnot?? Does this cause a headache if you are dealing with an application that requires user authentication, since you have to now check on serval pages for authorization? Maybe an IFrame for content is better? Just one of those questions that has been bugging me. thanks... I would not use frames. I would instead use fragment caching, that is, cre...

What generals generally do
Reading a McChrystal thread elsewhere, I came across someone quoting a US general http://en.wikipedia.org/wiki/Smedley_Butler > I spent 33 years and four months in active military service and > during that period I spent most of my time as a high class thug for > Big Business, for Wall Street and the bankers. In short, I was a > racketeer, a gangster for capitalism. I helped make Mexico and > especially Tampico safe for American oil interests in 1914. I helped > make Haiti and Cuba a decent place for the National City Bank boys to > collect revenues in. I ...

To frame or not to frame
Hi,    I was having troubles with framing my website using visual web developer 2008 and so was looking around on this forum. It was surprising to see many negative comments about frames and to find out that XHTML doesnt even support frames. Now Im leaning towards not using frames. I want to have 3 different sections of my website: A header with my company name A side section where I can put links and maybe put advertisements later on (graphics) A main section where all the real stuff shows up  The problem is that Visaul Web developer doesnt support that kind o...

To frame or not to frame?
Hi all,Normally do you build your web apps using frames? I'm having several troubles using firefox, its behaviour presents many differences.. it does not accept resizing, borders etcthanks It is probably a personal thing with frames. Personally I think they are nasty. They cause more problems than they solve. They do not meet accessibility standards. The improvements on caching with ASP.NET allow for very fast returns by caching user controls that you might normally keep in a frame, such as menu/navigation. That's an easy one. Not to. It means ugly Javascript solutions, problems wi...

Frames or NO frames.
Hi, sorry probably a topic discussed at lengths somewhere but I was wondering. If I have a ASP.NET c# web application that contains the traditional header, left navigation bit and content to the right, is there any compelling reason for me not to use frames? I realise one issue may be browser compatability but how many browsers these days don't support frames. If it helps, I am writing an intranet application rather than a full internet app so I don't see browser type too much of an issue. Thanks for your comments. Graham Allwood Browser compatibility hasn't been the issue...

delphi.general
Sorry if this is "out of topic"! but since some days ago I can't read the group *embarcadero.public.delphi.language.delphi.general* Does anybody know if there's something wrong with it? Or maybe is my reader? (Thunderbird) I get this messagge when I try to read the latest messages: Error! newsgroup server responded:no such article found Perhaps the article has expired <692702@forums.embarcadero.com> (33145) Click here to remove all expired articles sergio wrote: > Sorry if this is "out of topic"! but since some days ago I can'...

Notify not Notifying
One of my users sends emails out, but they are not picked up by notify. They show up as normal in another users inbox, but they do not show up in Notify and therefore do not pop up on the screen. Any ideas what may be causing this? We are running GW 7.0.1 clients on Windows XP Professional. Thanks! Menu Tools/Options/Send In the "Send Options" tab, there's a checkbox saying: "notify recipents" -- Best Regards Tommy Mikkelsen IT Quality A/S Denmark Novell Support Forums SYSOP Please Report back any success or failure, That way we all...

Redirect Parent Frame
I have a form in a Frame and I want the Entire page to be redirected when pressing the submit button in the Frame. How can I tell the Parent frame of the web page to be redirected?? thanks, Karl I am not sure you can do this. But the Client Side Script forum might be a better option to ask this question....

delphi.general Timer
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --JivePart=_202d5.zeB8CwDOH5aMJzMl Content-Type: text/plain; charset="Utf-8" For Paolo Valle --JivePart=_202d5.zeB8CwDOH5aMJzMl Content-Type: application/octet-stream; name="SubroutineTimer.pas" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="SubroutineTimer.pas" dW5pdCBTdWJyb3V0aW5lVGltZXI7DQoNCmludGVyZmFjZQ0KDQpwcm9jZWR1cmUgU3RhcnRTdWJy b3V0aW5lVGltZXI7DQpmdW5jdGlvbiBHZXRTdWJSb...

Web resources about - Frame notifies parent - embarcadero.delphi.general

Facebook notifies advertisers of high-performance ad sets
Earlier this year, Facebook informed advertisers that the company is tweaking and adding levels to the campaign structure — going from campaign ...

University of Sydney accidentally notifies students of admission
The University of Sydney has accidentally notified hundreds of students of their admission offers twelve hours before they were due to be released. ...

Second woman accuses MP Billy Gordon of domestic violence; Premier's office notifies police
Far north Queensland MP Billy Gordon faces new domestic violence allegations from a second woman.

Pentagon notifies Congress on civilian furloughs
US Secretary of Defense Leon Panetta on Wednesday notified the Congress that should automatic budget cuts be triggered on March 1, the Pentagon ...

Google notifies publishers that AdSense Direct is closing on February 10th (Update)
Google notified publishers on Wednesday that AdSense Direct will be closing on February 10th, just days after the one-year anniversary of the ...

Apple notifies winners in the WWDC ticket lottery, offers a chance to buy a ticket until April 14
... , ticket , Winners , WWDC Continue reading more about AAPL Company , WWDC , and 2014 at 9to5Mac . What do you think? Discuss "Apple notifies ...

Smart Lock Now Notifies You When It Locks Your Phone After 4 Hours Of Inactivity
Google has been rolling out updates to Smart Lock over the past months, adding On-body detection and Trusted voice, and while this recent change... ...

Spotify Now Lets You View Your Play Queue And Notifies You Of Playlist Duplicates
The latest update to the official iOS app of Spotify introduces several new features to its iPhone edition.

Apple notifies developers of ongoing iCloud Drive maintenance, reminds to perform routine backups
Apple on Tuesday sent out emails to developers using OS X 10.10 Yosemite Preview builds, warning them to perform regular backups as the company ...

‘Push 4.0’ Notifies You of Anything and Everything
Although push notifications are incorporated into many apps, it’s not a feature that’s as prevalent as we’d like to stay on top of emails, RSS ...

Resources last updated: 11/23/2015 7:43:15 AM