Closed Thread
Results 1 to 2 of 2

Thread: Tab pages, Text Boxes and saving

  1. #1
    Davide's Avatar
    Davide is offline Programming God
    Join Date
    Dec 2009
    Location
    Manchester, UK
    Posts
    507
    Blog Entries
    8
    Rep Power
    11

    Tab pages, Text Boxes and saving

    Ok guys, this is a tricky one.

    I have a text editor with multiple tabs.

    When i click new or i open a new document, a tab opens, with a text box in it.

    To do that i just add a new tab to the tab control, and i add a new text box and set it to "Fill" in the tab page.

    But what can i do if i want to save a specific file of all the files opened in the tabs? I was thinking of sorting them into an array, but that's wont work cause i don't know how to grab the index of the selected text box.

    Any ideas?
    Are you a newbie programmer trying to learn C#? Check out my small tutorial: Visual C# Programming Basics

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    lobo521 is offline Learning Programmer
    Join Date
    Jan 2010
    Posts
    57
    Rep Power
    8

    Re: Tab pages, Text Boxes and saving

    You can check SelectedIndex or SelectedTab property of TabControl. I advise you to create new class wich inherit from TabPage class with method Save().
    Then code looks like that:

    Code:
    private static void OnSave()
    {
    ((MyTabPage)myTabControl.SelectedTab).Save();
    }

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Combo boxes and saving
    By Halfie44 in forum C# Programming
    Replies: 20
    Last Post: 06-22-2010, 06:17 PM
  2. Help with calculations using text boxes.
    By dionne in forum Visual Basic Programming
    Replies: 2
    Last Post: 02-18-2010, 07:00 AM
  3. Text Boxes & <br> PHP
    By Bioshox in forum PHP Development
    Replies: 7
    Last Post: 02-17-2010, 07:03 AM
  4. Resize Text Boxes
    By Sniped Sniper in forum Visual Basic Programming
    Replies: 4
    Last Post: 09-04-2009, 03:06 PM
  5. Report from Some text Boxes ??
    By _root in forum C# Programming
    Replies: 1
    Last Post: 05-22-2009, 05:04 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts