add maximize handler code via codebehind

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    add maximize handler code via codebehind

    Hi,

    Would like to know how i can add the following code via codebehind

    <ClientEvents>
    <Maximize Handler="function (el){ var view = Ext.getBody().getViewSize(); el.setSize(view.width, view.height); }" />
    </ClientEvents>
    Below is how i plan to add the code (handler code here)

    Dim newWin As New Coolite.Web.UI.Window
    With newWin
        .ID = "Win1"
        .Title = "google.com"
        .Width = Unit.Pixel(100)
        .Height = Unit.Pixel(100)
        .AutoLoad = http://google.com
        .Minimizable = True
        .Maximizable = True
        .Collapsible = True
        .ClientEvents = (handler code here)
        .Show()
    End With
    Thanks in advance.
  2. #2

    RE: add maximize handler code via codebehind


    Hi sashe,

    I'm mixing C# and VB here, but basically, you just need to create a ClientEvent object first.

    ClientEvent maximize = new ClientEvent();
    maximize.Handler = [hander code here];
    
    Dim newWin As New Coolite.Web.UI.Window
    With newWin
        .ID = "Win1"
        .Title = "google.com"
        .Width = Unit.Pixel(100)
        .Height = Unit.Pixel(100)
        .AutoLoad = http://google.com
        .Minimizable = True
        .Maximizable = True
        .Collapsible = True
        .ClientEvents.Maximize = maximize
        .Show()
    End With
    I think the following should work as well...

    .ClientEvents.Maximize = new ClientEvent([hander code here])
    Hope this helps.

    Geoffrey McGill
    Founder
  3. #3

    RE: add maximize handler code via codebehind

    Thanks alot geoffrey... that worked like a charm.

    Need another help tough was looking in the forums on how to minimize the window to a container but without any luck...

    any help on this would be greatly appreciated.

    Cheers,
    Sashekumar

Similar Threads

  1. [CLOSED] adding handler listener in codebehind
    By ashton.lamont in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: May 05, 2010, 4:50 PM
  2. Handler/Fn for column (code behind)
    By roszman in forum 1.x Help
    Replies: 1
    Last Post: Apr 28, 2010, 4:36 AM
  3. Checkbox changed handler in code-behind
    By drakaan in forum 1.x Help
    Replies: 6
    Last Post: Aug 24, 2009, 3:07 PM
  4. Assign GetRowClass-Handler in codebehind
    By pschojer in forum Bugs
    Replies: 1
    Last Post: Jul 13, 2009, 1:40 PM
  5. Replies: 0
    Last Post: Apr 14, 2009, 6:10 PM

Posting Permissions