473,791 Members | 2,899 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems with a user Control (Similar to the TabControl)

Hi,

I'm running mad with this issue, hope I can explain it correctlly.

I've been developping a user control wich is very similar to the
TabControl... Basically my control has two panels that act as containers:
one for the buttons and the other one for something similar to the TabPages.

For my pages I've declared:

<System.Compone ntModel.Designe r("System.Windo ws.Forms.Design .ParentControlD e
signer,System.D esign", GetType(System. ComponentModel. Design.IDesigne r))> _
Public Class NavigatorPage
Inherits System.Windows. Forms.UserContr ol

...
End Class

this allows me to add controls at design time for my page... The only thing
that is going wrong is that when I select the page I'm interested from the
PropertiesCombo the page doesn't come to the front therefore I can only add
controls (Visually) to my last page. I know I could add other control from
code, but I'd like to be able to add controls visually. ¿Any ideas?

Another thing in wich is driving me mad is that I've defined a collection of
pages (Inherits from CollectionBase) . On the Add function I add the controls
to their respective panels, however the pages and buttons get showed after I
run the aplication, not when added to the control through the propertyGrid.
I guess this must be posible to do since the tabControl acts this way, and
also the Listview control adds the columns right away in the designer. How
could I get this results?

Thak you in advance,

Juan
Nov 21 '05 #1
0 1034

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2001
by: Paiam Salavati | last post by:
I want to change the the color of the tabs and the color of TabControl itself in a TabControl. Therefore I wrote the following code in my customized TabControl-class: this.DrawMode = TabDrawMode.OwnerDrawFixed; protected override void OnDrawItem(DrawItemEventArgs e) {
1
5139
by: Sumit | last post by:
Hi all, I have a windows form in which i have a tabcontrol having 4 tabs. I have made 4 user controls for each of the tabpage. I add the user controls on the tabpage programatically. Now in the leave event of the user controls i have written a code which checks whether all the mandatory information have been filled in the textboxes, comboboxes etc. present on the user control.
0
831
by: Murat Tunaboylu | last post by:
I develope an user control which contains tabcontrol and tabpages. The question is : when i use my user control in a windows application form the design-time behaviours of the tabcontrol and the tabpages are not usable. how can i add more tabpages to a tabcontrol which is wrapped with an user control , in a windows application form designer. using visual studio.net 2003 / visual basic .net Thanks
3
1574
by: meh | last post by:
Hi All; After creating a new tab if I delete the tab I cannot close my app from the X in the upper right of the window. NE1 have a clue why. Tried stepping through the delete seems to work fine but I can not close the app?????? I am creating a new Tab this way..... ElseIf e.Button Is tbNewVol Then
5
2103
by: Doug Handler | last post by:
Hi, I have a form (Form1) that contains a tab control which one tab has a customer user control (UserControl1). When the user double-clicks on the grid hosted there a new user control is created. I have a delegate / event that passes via EventArgs the appropriate info from the grid to the UserControl2. This works fine, except for now I'm a little lost on the final step....I need that once the UserControl2 is "filled out" that it is...
3
1824
by: Marc Solé | last post by:
Hello to everybody. I have a little problem with a Custom Control that I have created. The thing is that in my control, when I click a button, it should create another object in the main form. My control is located in a TabPage, and I want that when the user clicks a button, a new tabPage is created, but by now, I don't know how to do that. Any ideas, suggestions, links are wellcomed.
5
6887
by: svein.erik.storkas | last post by:
I'm creating an application where the user first selects a number from a combobox. Based on his choice of number, ComboBoxes and buttons are to be created (at runtime of course). Let's say that the ComboBox is to be named cboTeam and the index number (cboTeam1, cboTeam2 ...) It is also to be attached inside a specific tabpage. How can I do this? Some code:
0
1093
by: samadams_2006 | last post by:
Hello, I have a VB.NET Form which has a System.Windows.Forms.TabControl on it. This TabControl has 5 Tabs on it. On each tab, I have various textboxes, option boxes, radio boxes, etc. I would like to have the ability to save the focus on a particular control, so that when I go to another tab, then back to the same tab, the control I left will still be the highlighted control. For example, if I'm on the "City" Textbox on the...
1
2232
by: mnuckols | last post by:
I am trying to create a custom container control for Windows Forms using C#.NET 2.0. My problem is that I want only part of the control to allow other controls to be placed on it at design time. A similar example to what I'm trying to accomplish is a Tab Control. The tab pages of a tab control allow child controls to be added to the page region, but not to the tab. Does anyone know how to accomplish this?
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10154
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9029
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5430
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2913
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.