change the position of PopupControlExtender

Last post 07-04-2009 6:46 AM by majd_wadi. 4 replies.

Sort Posts:

  • change the position of PopupControlExtender

    07-01-2009, 5:47 AM
    • Member
      196 point Member
    • majd_wadi
    • Member since 04-15-2008, 3:08 PM
    • Posts 140

    hello all

    is there away i can change the position of PopupControlExtender other that the positions given from (position) property ?

    i want it bottom, but also i wanna move it to the left ...?


    tthanx all in advance.

    GLORY
    ~Please mark as answer if this helps u~
  • Re: change the position of PopupControlExtender

    07-01-2009, 9:42 AM
    Answer
    • Star
      7,657 point Star
    • agolden
    • Member since 08-03-2002, 10:56 AM
    • Houston, TX
    • Posts 1,032

    Hi majd_wadi,

    You can use the OffsetX porperty of the PopupControlExtender to adjust the horizontal position (a negative value will move the popup to the left).

    Hope that helps.

    Aaron

    Don't forget to click "Mark as Answer" on the post that helped you. This credits that member, earns you a point and marks your thread as Resolved so everyone will know you have been helped.
  • Re: change the position of PopupControlExtender

    07-01-2009, 10:28 AM
    • Member
      196 point Member
    • majd_wadi
    • Member since 04-15-2008, 3:08 PM
    • Posts 140

    Hi agolden

    Thanx for your reply, it works great now.

    but i noticed sth, the positin where the popup appears depends on where you click, so if i have a 15 pixles-width lable ..if i click on its start the pop up appears with an ofsets from the click position ..so the popup's position won't be the same on different click positions.

    how can i make the popup appears in one position regardless where user clicked?

    thanx.

    GLORY
    ~Please mark as answer if this helps u~
  • Re: change the position of PopupControlExtender

    07-02-2009, 9:41 AM
    • Star
      7,657 point Star
    • agolden
    • Member since 08-03-2002, 10:56 AM
    • Houston, TX
    • Posts 1,032

    I did a test with a Label as the target for a popup and I don't see that behavior, so it would be helpful to see your code (and any applicable CSS).

    Aaron

    Don't forget to click "Mark as Answer" on the post that helped you. This credits that member, earns you a point and marks your thread as Resolved so everyone will know you have been helped.
  • Re: change the position of PopupControlExtender

    07-04-2009, 6:46 AM
    • Member
      196 point Member
    • majd_wadi
    • Member since 04-15-2008, 3:08 PM
    • Posts 140

    HTML clipboard thanx for your reply, it only does that when the lable text is in Arabic, when it's in english it works fine!! that's wierd.

    if you wanna see it live, please check (the component is on the bottom right of the page).



    when it's english :

    http://pehla.arabinfonet.com/Channels/Entertainment/ARYDigital/tabid/91/Default.aspx

    when it's arabic:

    http://pehla.arabinfonet.com/Channels/Entertainment/AAJTV/tabid/90/Default.aspx



    anyway here's the code and the CSS Classes.


    HTML clipboard thanx for your reply, it only does that when the lable text is in Arabic, when it's in english it works fine!! that's wierd.

    if you wanna see it live, please check (the component is on the bottom right of the page).



    when it's english :

    http://pehla.arabinfonet.com/Channels/Entertainment/ARYDigital/tabid/91/Default.aspx

    when it's arabic:

    http://pehla.arabinfonet.com/Channels/Entertainment/AAJTV/tabid/90/Default.aspx



    anyway here's the code and the CSS Classes.





    pnlSynopsis = CType(Session("pnlSynopsis"), Panel)

                pnlSynopsis = New Panel()



                popUp = CType(Session("popUp"), AjaxControlToolkit.PopupControlExtender)

                popUp = New AjaxControlToolkit.PopupControlExtender





                pnlSynopsis.Controls.Add(New LiteralControl("<table class='FreeText' style=width: 85%; cellpadding=0 cellspacing=0 border=0>" + _

                    "<tr><td style=width:4px; height:4px;></td><td></td><td></td></tr><tr><td></td><td>" + _

                    firstProgramName + "<br />" + firstProgramStart.ToShortTimeString + " - " + firstProgramEnd.ToShortTimeString + "<br /><br />" + firstProgramDescription.Replace("<", "").Replace(">", "").Replace("br/", "").Replace("/p", "") + _

                   "</td><td style=width:4px;></td></tr><tr><td style=height:4px;></td><td></td><td></td></tr></table>"))

                pnlSynopsis.CssClass = "FreeText"

                pnlSynopsis.HorizontalAlign = HorizontalAlign.Left

                popUp.OffsetX = -100

                popUp.OffsetY = 8

                pnlSynopsis.ID = "synopsis_" + firstProgramName + i.ToString

                pnlSynopsis.BackColor = ColorTranslator.FromHtml("#fafafa")

                pnlSynopsis.Width = 270

                pnlSynopsis.Height = 120

                pnlSynopsis.ScrollBars = ScrollBars.Vertical

                popUp.PopupControlID = pnlSynopsis.UniqueID

                popUp.TargetControlID = hlFirst.ID

                popUp.Position = AjaxControlToolkit.PopupControlPopupPosition.Bottom


                Me.Controls.Add(popUp)

                Me.Controls.Add(pnlSynopsis)


    HTML clipboard

    and here's FreeText CSS:

     

    .FreeText
    
    {
    scrollbar-arrow-color: white;
    scrollbar-face-color: #d3d3d3;
    scrollbar-shadow-color: #d3d3d3;
    scrollbar-highlight-color: #d3d3d3;
    scrollbar-darkshadow-color: #d3d3d3;
    scrollbar-3d-light-color: d3d3d3;
    scrollbar-track-color: #d3d3d3;
    scrollbar-base-color: #d3d3d3;
    scrollbar-lightshadow-color: #d3d3d3;
    font-family:Arial;
    font-size:11px;

    color:#555555;
    }

    and here's the Lable that's clicked CSS:

     

    .LinkStyle1
    
    {
    font-family:Arial;
    font-size:10px;
    text-decoration:underline;
    color:#0084b5;
    cursor:pointer;
    }

     

    GLORY
    ~Please mark as answer if this helps u~
Page 1 of 1 (5 items)