List Info

Thread: Controls depending buttons ...




Controls depending buttons ...
user name
2006-04-12 18:07:37
Hello,


I'm little bit newbie in Windows Forms with .NET, I made a
lot of
application with Delphi.

I have a simple question, imagine, I have a form with 2
buttons, these
buttons are on the left of the the form.

When I click on the second one,  the section on the right
change and appear
some controls

When I click on the first one, the section change again but
with some others
controls

Wich is the best way to do that ?

Thanks,

Gabriel,
Controls depending buttons ...
user name
2006-04-12 19:13:50
I've used the panel control for this purpose, in the past. 
Drop the panel on the winform and add controls to it (within
it).  At runtime, hide and show the panels as appropriate.

Mitch
http://www.enterpriseetc
.com

----- Original Message ----
From: Gabriel <ml.dotnet.webGMAIL.COM>
To: DOTNET-WINFORMSDISCUSS.DEVELOP.COM
Sent: Wednesday, April 12, 2006 2:07:37 PM
Subject: [DOTNET-WINFORMS] Controls depending buttons ...


Hello,


I'm little bit newbie in Windows Forms with .NET, I made a
lot of
application with Delphi.

I have a simple question, imagine, I have a form with 2
buttons, these
buttons are on the left of the the form.

When I click on the second one,  the section on the right
change and appear
some controls

When I click on the first one, the section change again but
with some others
controls

Wich is the best way to do that ?

Thanks,

Gabriel,
Controls depending buttons ...
user name
2006-04-12 19:20:40
panels or usercontrols

-----Original Message-----
From: Discussion forum for developers using Windows Forms to
build apps
and controls [mailtoOTNET-WI
NFORMSDISCUSS.DEVELOP.COM]On Behalf Of
Gabriel
Sent: Wednesday, April 12, 2006 2:08 PM
To: DOTNET-WINFORMSDISCUSS.DEVELOP.COM
Subject: [DOTNET-WINFORMS] Controls depending buttons ...


Hello,


I'm little bit newbie in Windows Forms with .NET, I made a
lot of
application with Delphi.

I have a simple question, imagine, I have a form with 2
buttons, these
buttons are on the left of the the form.

When I click on the second one,  the section on the right
change and appear
some controls

When I click on the first one, the section change again but
with some others
controls

Wich is the best way to do that ?

Thanks,

Gabriel,

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.1/309 - Release
Date: 4/11/2006

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.1/309 - Release
Date: 4/11/2006
Controls depending buttons ...
user name
2006-04-12 19:19:37
I have an application that does this. I put the two sets of
controls in a
Panel Control and place them both off the form then when the
first button is
pressed you:

Firstbutton_onclickevent{
        this.panel2.location = new
Point(somexvalueoffform,someyvalueoffform);
        this.panel1.location = new Point(somexvalue,
someyvalue);
        //rest of your code
}
And do the same for the other button.



-----Original Message-----
From: Discussion forum for developers using Windows Forms to
build apps and
controls [mailtoOTNET-WI
NFORMSDISCUSS.DEVELOP.COM] On Behalf Of Gabriel
Sent: Wednesday, April 12, 2006 1:08 PM
To: DOTNET-WINFORMSDISCUSS.DEVELOP.COM
Subject: [DOTNET-WINFORMS] Controls depending buttons ...

Hello,


I'm little bit newbie in Windows Forms with .NET, I made a
lot of
application with Delphi.

I have a simple question, imagine, I have a form with 2
buttons, these
buttons are on the left of the the form.

When I click on the second one,  the section on the right
change and appear
some controls

When I click on the first one, the section change again but
with some others
controls

Wich is the best way to do that ?

Thanks,

Gabriel,
Controls depending buttons ...
user name
2006-04-12 19:52:23
> panels or usercontrols


My sample was simple, but I think I'll have a lot of button
or/and menu.

It's not userscontrols + panel ?

Because, when you click on the first button you have to
create the control
(new) and destroy the previous controls.

It's not easier to to put usercontrols on panel and
hide/show them ?

Thanks,
Controls depending buttons ...
user name
2006-04-12 19:58:30
you're right...

load the usercontrol into a panel on the fly based on user
activity


-----Original Message-----
From: Discussion forum for developers using Windows Forms to
build apps
and controls [mailtoOTNET-WI
NFORMSDISCUSS.DEVELOP.COM]On Behalf Of
Gabriel
Sent: Wednesday, April 12, 2006 3:52 PM
To: DOTNET-WINFORMSDISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-WINFORMS] Controls depending buttons
...


> panels or usercontrols


My sample was simple, but I think I'll have a lot of button
or/and menu.

It's not userscontrols + panel ?

Because, when you click on the first button you have to
create the control
(new) and destroy the previous controls.

It's not easier to to put usercontrols on panel and
hide/show them ?

Thanks,

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.1/309 - Release
Date: 4/11/2006

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.1/309 - Release
Date: 4/11/2006
Controls depending buttons ...
user name
2006-04-12 20:09:10
>
> load the usercontrol into a panel on the fly based on
user activity



The "bad" point for this solution, it's more
coding, create/destroyu each
control ...

The easiest way is a panel for each activity and show/hide
them based on
user activity but it's less flexible.

right ?

Thanks,
SV: Controls depending buttons ...
user name
2006-04-14 08:32:33
AFAIR, the TabControl can mimic this.

Best Regards,
 
Benny S. Tordrup
 
-----Oprindelig meddelelse-----
Fra: Discussion forum for developers using Windows Forms to
build apps and
controls [mailtoOTNET-WI
NFORMSDISCUSS.DEVELOP.COM] På vegne af Phil
Sayers
Sendt: 12. april 2006 21:21
Til: DOTNET-WINFORMSDISCUSS.DEVELOP.COM
Emne: Re: [DOTNET-WINFORMS] Controls depending buttons ...

panels or usercontrols

-----Original Message-----
From: Discussion forum for developers using Windows Forms to
build apps
and controls [mailtoOTNET-WI
NFORMSDISCUSS.DEVELOP.COM]On Behalf Of
Gabriel
Sent: Wednesday, April 12, 2006 2:08 PM
To: DOTNET-WINFORMSDISCUSS.DEVELOP.COM
Subject: [DOTNET-WINFORMS] Controls depending buttons ...


Hello,


I'm little bit newbie in Windows Forms with .NET, I made a
lot of
application with Delphi.

I have a simple question, imagine, I have a form with 2
buttons, these
buttons are on the left of the the form.

When I click on the second one,  the section on the right
change and appear
some controls

When I click on the first one, the section change again but
with some others
controls

Wich is the best way to do that ?

Thanks,

Gabriel,

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.1/309 - Release
Date: 4/11/2006

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.1/309 - Release
Date: 4/11/2006

-- 
----------------------------------------
Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
Den har indtil videre sparet mig for at få 44144 spam-mails.
Betalende brugere får ikke denne besked i deres e-mails.
Hent gratis SPAMfighter her: www.spamfighter.dk
[1-8]

about | contact  Other archives ( Real Estate discussion Medical topics )