473,473 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Textbox -> Tabs

11 New Member
I'm writing a simple text viewer whereby double clicking an item in a given listbox loads the appropriate text in a textbox. Now I need to be able to double click on multiple items from the listbox and display them each in a different tab, what is the easiest way of doing this?
Jun 6 '08 #1
2 1220
CyberSoftHari
487 Recognized Expert Contributor
  • Select the listbox property selectionmode = multisimple .
  • You should write your selection code in a command button.
  • Use a for loop to place all selected text in the textbox.
All the best.
Note: you should give appropriate topic “How Do I Select Multiple rows in listbox control ” followed by your C# or VB .Net Code version.
Jun 7 '08 #2
Curtis Rutland
3,256 Recognized Expert Specialist
If you want to put your results in tabs, you can use the TabControl.

Here is a method I wrote to add tabs to a tab control. I added some code to add a textbox to the tab, but you'll need to customize that part.
Expand|Select|Wrap|Line Numbers
  1. //c#, but you can convert to VB easily if you need to
  2. //using statements
  3. .
  4. .
  5. .
  6. private int tabCount = 2; //how ever many tabs that you start with
  7. .
  8. .
  9. //constructors
  10. .
  11. .
  12. private void CreateNewTab(string tabTitle, string textForTextBox)
  13. {
  14.     tabControl1.TabPages.Add("tab" + tabCount, tabTitle); 
  15.     tabControl1.TabPages[tabCount].CreateControl();
  16.     tabControl1.TabPages[tabCount].BackColor = Color.White;
  17.     TextBox tb = new TextBox();
  18.     tb.Text = textForTextBox;
  19.     tabControl1.TabPages[tabCount].Controls.Add(tb);
  20.     tb.Left = 10;
  21.     tb.Top = 10;
  22.     tabCount++;
  23. }
  24.  
Jun 7 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jonas L | last post by:
Hi, I need to create a textbox which acts as a normal textbox but with the following extra requirements: 1) In-focus color, when the textbox gets focus the backcolor property of the textbox...
4
by: Rodrigo DeJuana | last post by:
Howdy, I'm new to this .net stuff and really have little to no training. Im trying to create a new page for a web form, so i have been pretty much jsut coping code. I having some issue with...
0
by: Newasps | last post by:
Hi guys, I have a problem with UpdateCommand Event. In tihs event Ä°'m creating required controls to get that controls' values and also get them. But when I try to get updated values I'm getting the...
7
by: I am Sam | last post by:
I have a DataGrid that is passing information to a stored procedure properly but the parameters aren't being casted properly. I was woundering if anyone can tell me how I should properly cast the...
11
by: Keith | last post by:
I apologize for those of you who think I'm posting on the same topic. It is not that I don't appreciate all of your comments - and I'm definitely reading them all - but I think I have a differing...
2
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know. Thanks in advance. Mamatha
3
by: Brad Rogers | last post by:
All, Being immersed in vb.net and trying CSharp after almost a year I forgot the differences. I like vb fixing the uppercase/lowercase names and seeming to be more flexible to code entry. ...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
8
by: Marco Pais | last post by:
Hi there. How can I change the background color of a textbox when it gets the focus? I can handle the "Enter" event and do this private void txtDummie_Enter(object sender, EventArgs e) { ...
1
by: Andy B | last post by:
I have this code: protected void EditEventsWizard_NextButtonClick(object sender, WizardNavigationEventArgs e) { //get the values from the DetailsView TextBox StartTime =...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.