Some kind of all opener, need help :) menu

User Tag List

Results 1 to 7 of 7
  1. #1
    Mitron's Avatar Contributor
    Reputation
    127
    Join Date
    Jun 2008
    Posts
    1,324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Some kind of all opener, need help :)

    okay so i want a textbox + a button wich u can open everything in your app with... lets say you have a hidden panel and and just need to write "panel1" in the textbox and click Open button and it shows... anyone know how to fix ?

    i think it should work something like "textbox1.text" + .show()
    but i dunno :P anyone have ideas ?? ^^

    ----------------------------------------------------------------

    Some kind of all opener, need help :)
  2. #2
    grak's Avatar Contributor
    Reputation
    94
    Join Date
    Jul 2008
    Posts
    151
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Editted, nevermiiiiind.
    Last edited by grak; 10-07-2009 at 02:42 PM.

  3. #3
    Mitron's Avatar Contributor
    Reputation
    127
    Join Date
    Jun 2008
    Posts
    1,324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm yea that works but what aobut if you have... 50 panels ? :O u have to write that code 50x times
    EDIT: one thing i forgot to say.... the textbox text should be merged together with .show() into a code... in some way... is it even possible ?
    u know what i mean ?
    Last edited by Mitron; 10-07-2009 at 02:38 PM.

    ----------------------------------------------------------------

  4. #4
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put them all in an array, grab the number, do panel(number).show()

  5. #5
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
            public bool ShowControl(string name, Control.ControlCollection controls)
            {
                foreach (Control control in controls)
                {
                    if (ShowControl(name, control.Controls))
                    {
                        return true;
                    }
                    if (control.Name == name)
                    {
                        control.Show();
                        return true;
                    }
                }
                return false;
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                ShowControl(textBox1.Text, Controls);
            }
    Enjoy.

  6. #6
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    Public Function ShowControl(ByVal name As String, ByVal controls As Control.ControlCollection) As Boolean
        For Each control As Control In controls
            If ShowControl(name, control.Controls) Then
                Return True
            End If
            If control.Name = name Then
                control.Show()
                Return True
            End If
        Next
        Return False
    End Function
    
    Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
        ShowControl(textBox1.Text, Controls)
    End Sub
    Automagic translation.

  7. #7
    Dmxsbb's Avatar Banned
    Reputation
    14
    Join Date
    Jun 2009
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Reference it as a object, then use Suffix show

Similar Threads

  1. [Trinity] Players Learn all Spells NEED HELP!
    By V1cTorY in forum WoW EMU Questions & Requests
    Replies: 12
    Last Post: 12-05-2010, 06:41 PM
  2. Hi all, really need help setting up my own server
    By johnyelland1234 in forum WoW EMU Questions & Requests
    Replies: 66
    Last Post: 01-12-2010, 06:17 AM
  3. Need help forgetting all the things I know about WoW.
    By MagellanFreet in forum World of Warcraft General
    Replies: 2
    Last Post: 12-23-2007, 01:17 AM
  4. need help to find some programs
    By Drakee in forum Community Chat
    Replies: 4
    Last Post: 05-01-2007, 07:58 AM
  5. Need help finding some textures...
    By sooos in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 12-24-2006, 02:25 PM
All times are GMT -5. The time now is 08:15 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search