![]() ![]() EventArgs) Handles MyBase.LayoutUpdatedĭebug.Print( "LayoutUpdated Starting Width = " & TabControl6.Width)ĭebug.Print( "LayoutUpdated Ending Width = " & TabControl6.Width)Īnd both with the same result, which is the tab not being sized appropriately. I tried both the Window_SizeChanged event as well as Private Sub Window_LayoutUpdated( ByVal sender As System. The debugs are there as a check, and sure enough the width is the same before and after TabControl6.Width = width. SizeChangedEventArgs) Handles MyBase.SizeChangedĭebug.Print( "SizeChange event Starting Width = " & TabControl6.Width)ĭebug.Print( "SizeChange event Ending Width = " & TabControl6.Width) My question really boils down to why this code doesn't resize the control: Private Sub Window_SizeChanged( ByVal sender As System. Sorry for not replying soone Sheldon_Xiao, for some reason I wasn't getting email notifications that someone replied. This code works fine when the program initially loads: The issue is, if the end user wants to adjust the window size while the program is running, the tab doesn't resize as I had doesn't resize at all actually. The width of the tab control expands (to give a slider effect), they fill in the controls, execute another event and the tab "slides" back. What I'd like them do be able to do is execute an event and Also, you can see that they tab control is set to be off screen so the user can see the majority of the underlying grid. ![]() So as you can see, I have spacing I was looking for from my tabs. Each tab will have various controls on it (that don't exist yet) and the grid that houses the tabs will display some summary information based on the data entered I'd like to have a tab control on my main grid that has some spacing between the tabs. Here's what I'm trying to do, and I'm all ears for suggestions. If anyone has any insight or help, it is greatly appreciated. It's just not being applied to the tab control. I put in the textbox1 and textbox2 to make sure that the code is firing and the proper values are set. width property of the tab control by executing the code to change the width, the tab control Is re-sized as it should (albeit undesired because the starting width of the control is LayoutRoot.ActualWidth - 50, and not 103 as I'd like). So on initial execution of the code, the tab control Once it's changed, the tab control is no longer sized when the window is resozed. The code works if the tab control's width isn't changed initially (that's why the If statement is commented out). What I'd like to happen is, if the end user changes the size of the main window (maximizes, resizes ext), the tab control gets re-sized accordingly. The user can expand out the tab to a range of LayoutRoot.ActualWidth - 50 (LayoutRoot is the Name of my MainWindow). I have a tab control tucked off to the side (with a starting width of 103 so just the tab is visible). ![]() TextBox1.Text = LayoutRoot.ActualWidth - 50 TabControl1.Width = LayoutRoot.ActualWidth - 50 Private Sub Window_SizeChanged( ByVal sender As Object, ByVal e As ) Handles Me.SizeChanged ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |