Can anyone help me determine how to change the height of the WebTab so that it changes depending on the screen.height of the user's screen. I was able to do this with the UltraWebGrid by doing the following in the InitializeLayoutHandler, but I can't figure out how to do the same thing for the WebTab:
grid.resize(screen.width - 65, screen.height - 395);
OK...so that didn't work for me. The tab height doesn't change if I change the screen resolution. When viewing what is returned, it seems to always return the same width and height regardless of what I choose as the resolution.
Any suggestions?
Hi,
It is not clear what you need to do. Your (probably) server codes refer to Windows.Form, but codes related to grid are probably javascript.
If you need to change size of WebTab on client, then you may use setSize(width, height) method. For example, process Initialize or Loaded event and:
<script type="text/javascript">function WebTab1_Loaded(sender, eventArgs){ sender.setSize('200px', '100px');}</script><ig:WebTab ID="WebTab1" runat="server" ...> <ClientEvents Loaded="WebTab1_Loaded" /> ...</ig:WebTab>
Using the $find() method is the difference! Viktor, have you ever been kissed by a man? =P Linking this solution to the other thread. I'm hoping it will make it into Google's search index for this issue exactly. This will help a lot of people methinks.
Hi Anthony,
The setSize is a member of javascript WebTab object. You may call it at any time including dynamic resizes (if your application implements similar feature).
var newWidth = '350px'; // or nullvar newHeight = '300px'; // or null// get reference to WebTab (or any other method, like param in event)var webTab = $find('<%=WebTab1.ClientID%');if(webTab) webTab.setSize(newWidth, newHeight);
Viktor, this code is great for resizing the control on load, but what is the method for dynamically resizing a WebTab control as the user resizes the client?
This piece of code works great, but the others that you have posted where you try to set the tab's style.height properties do not work.
It would be very, very helpful if the tab supported the resize event as part of the <ClientEvents/> tags. If not that, then how do I call the Tab.setSize() function? var t = document.getElementById("tabid"); t.setSize doesn't work.
Awesome! This is exactly what I needed. Sorry it took me so long to respond...I had kind of put this on the back burner since I couldn't get it to work and just thought about it again today and saw that you suggested an answer.Thank you so much!