TabControl problem
-
I have a form with a tabcontrol(with 2 tabpages) and I add a new TabControl at runtime using this->Controls->Add(gcnew TabControl()); Its been created at top left corner of windows and not visible fully..how to control its location/size etc? how to access it? Thanx in advance
-
I have a form with a tabcontrol(with 2 tabpages) and I add a new TabControl at runtime using this->Controls->Add(gcnew TabControl()); Its been created at top left corner of windows and not visible fully..how to control its location/size etc? how to access it? Thanx in advance
I think you need to be in the C++ message boards. Anyway, you could do something like: TabControl* tabCtrl = new TabControl(); this->Controls->Add( tabCtrl ); Now use tabCtrl to get its position etc.
My pointless rants meragussa.blogspot.com[^]
-
I think you need to be in the C++ message boards. Anyway, you could do something like: TabControl* tabCtrl = new TabControl(); this->Controls->Add( tabCtrl ); Now use tabCtrl to get its position etc.
My pointless rants meragussa.blogspot.com[^]
-
oops.. wrong section.. I cant do the way u describe...as I have to create some tabcontrols dynamically at runtime but not at design time
I still do not see why you cannot do that. perhaps a little more code from what you are attempting to do will be useful. You could do something like. void MyPage::CreateTabControl() { TabControl * tab = new TabControl(); Controls->Add( tab ); SizeAndPositionTab( tab ); //Put you size and position code in here } Now call CreateTabControl() dynamically from wherever in your code.
My pointless rants meragussa.blogspot.com[^]
-
I still do not see why you cannot do that. perhaps a little more code from what you are attempting to do will be useful. You could do something like. void MyPage::CreateTabControl() { TabControl * tab = new TabControl(); Controls->Add( tab ); SizeAndPositionTab( tab ); //Put you size and position code in here } Now call CreateTabControl() dynamically from wherever in your code.
My pointless rants meragussa.blogspot.com[^]