P
paul reed
Hello,
My custom control is acting strangely.
In my CreateChildControls method after creating my control, I wrap it in Div
tags... with something like:
Dim divStr As String = "<DIV STYLE=""overflow: auto; width: " &
Me.Width.ToString & _
"; height: " & Me.Height.ToString &
""">"
Controls.Add(New LiteralControl(divStr))
Controls.Add(_treeControl)
Controls.Add(New LiteralControl("</DIV>"))
I noticed though that I wasn't getting horizontal scroll bars (but was
getting vertical scroll bars). So, I got into debug and sure enough, the
Me.Width was 0px. However, sometimes I run the same page with the same
control and everything is fine...Height and Width have values and I do get
both scroll bars.
I have been very diligent to call EnsureChildControls() where appropriate as
I understand from other posts that many times things get "weird" if you
don't follow the correct protocol.
I am stumped.
Thanks,
Paul
My custom control is acting strangely.
In my CreateChildControls method after creating my control, I wrap it in Div
tags... with something like:
Dim divStr As String = "<DIV STYLE=""overflow: auto; width: " &
Me.Width.ToString & _
"; height: " & Me.Height.ToString &
""">"
Controls.Add(New LiteralControl(divStr))
Controls.Add(_treeControl)
Controls.Add(New LiteralControl("</DIV>"))
I noticed though that I wasn't getting horizontal scroll bars (but was
getting vertical scroll bars). So, I got into debug and sure enough, the
Me.Width was 0px. However, sometimes I run the same page with the same
control and everything is fine...Height and Width have values and I do get
both scroll bars.
I have been very diligent to call EnsureChildControls() where appropriate as
I understand from other posts that many times things get "weird" if you
don't follow the correct protocol.
I am stumped.
Thanks,
Paul