| |

VerySource

 Forgot password?
 Register
Search
View: 1323|Reply: 11

A control in a base class window does not want to display subclasses. How to do it?

[Copy link]

2

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-5 02:40:01
| Show all posts |Read mode
For example, there is a panel in the base class, and this panel in the subclass will cover the following subclass controls.
Reply

Use magic Report

0

Threads

110

Posts

63.00

Credits

Newbie

Rank: 1

Credits
63.00

 China

Post time: 2020-1-5 09:21:01
| Show all posts
I don't understand ..

direct:
Control.BringToFront (); Can't advance the control?
Reply

Use magic Report

2

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-1-5 11:30:02
| Show all posts
I just don't want the controls in the parent class to be inherited in the child class.
Reply

Use magic Report

0

Threads

110

Posts

63.00

Credits

Newbie

Rank: 1

Credits
63.00

 China

Post time: 2020-1-5 13:18:01
| Show all posts
TO: I just don't want the controls in the parent class to be inherited in the child class.

This seems to be impossible ..

You can change your mind, don't want to use Panel, then you can set its Visible to false ...

I also just learned C # soon, opinions are for reference only ..

Listen to the master downstairs to continue ..
Reply

Use magic Report

0

Threads

56

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-1-5 14:06:01
| Show all posts
Set the panel in the base class to protected, and write panel1.Visible = false in the Form_Load event of the subclass.
you try..
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 United States

Post time: 2020-1-5 18:21:01
| Show all posts
..........
Reply

Use magic Report

2

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-1-9 23:54:01
| Show all posts
Seemingly impossible, haha
Reply

Use magic Report

0

Threads

8

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-10 16:36:01
| Show all posts
Set it to private, huh, huh.
Reply

Use magic Report

0

Threads

8

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-10 16:54:01
| Show all posts
Set to private
Reply

Use magic Report

0

Threads

8

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-10 17:18:02
| Show all posts
Set to private
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list