Re: Control Lifecycle and Stuff

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks Yuan... The DIV concept may work for me. I've ahad to play with it
a bit and still have a couple of questions:

If I make a control that detects clicks on several elements, how do I pass
any of those clicks up to the parent as a standard click event? I've seen
stuff about bubbling up events, but not sure how to do it. (Basically,
assume my custom control is three HTML images. Regardless of which image
the user clicks on, the same click event should be triggered.)

Also, how can I set a property to default to the ID assigned to the control?
Thanks.

Jerry

""Yuan Ren[MSFT]"" <v-yren@xxxxxxxxxxxxx> wrote in message
news:VaEUvQHLGHA.668@xxxxxxxxxxxxxxxxxxxxxxxx
Hi Jerry,

Thanks for posting!

"First, is there a better way to accomplish this effect without creating
separate images for every button that I want to use in my app?"
If the image is generated dynamically, I think using the GDI+ is a correct
way for implementation.

"Is there an HTML control that can act as a button and that let's you put
a label over background graphics?"
Based on my experience, you can use the div which includes the button and
the label. Then, we can capture the click event of the div by using the
JavaScript. In the JavaScript code, calling the button click event.

"While I have all the image manipulation code working, and the button
seems to render just fine at design time, when I try to run a web page
that
uses the control, I get a GDI+ exception."
Could you please supply the details of the exception?

"How do I tell the control not to run the GDI code at run time?"
I'm sorry I can not understand the issue clearly. Does this mean the
method
is just called in design time but not in run time?

Regards,

Yuan Ren [MSFT]
Microsoft Online Support



.



Relevant Pages

  • Re: Non-scrolling section on my page
    ... It might be done by writing some Javascript code to control the height of div based on the height of screen. ... Bin Song ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Prefered frame of reference
    ... can't control your studies directly. ... "Opponents of the division in the sciences counter that the "social ... > Given v has dimensions of length/time and the Div operation divides ... Rather irrelevant for the specific meaning of "preferred frame" in physics. ...
    (sci.physics)
  • Re: Prefered frame of reference
    ... Controlled in the scientific sense mean that 'you' control all the ... in the context of a compressible field does the non-zero Div v ... operator devoid of the underlying physics. ... > I can grasp the concept of a fixed plane and understand the concept of ...
    (sci.physics)
  • Re: Why adding runat=server to a div tag throws an exception of type System.Web.HttpException in con
    ... foreach (Control c in this.Controls) ... please put quotes around "server" in your div. ... The textbox is in the div collection but the div collection itself is ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Content Place Holder Width
    ... MasterPage, and have the Content control inside it, for the actual page to ... that I don't like is that I have to basically use a Panel or Div on every ... single page that uses the master page, this seems to defeat the purpose ... Div on each of the page that uses the master page, ...
    (microsoft.public.dotnet.framework.aspnet)