Show / Hide WinForm Details

I am creating a WinForm application (.net3.5) where I am showing some client information. My problem is that we have a directions field that correlates with the address. To save the room, I would like the directions to be hidden until the user β€œwants” them to be seen. My intended method was to have an "accordion", as a presentation for these directions.
I would suggest that I could also do this with a hidden field and BringToFront () (it would be better).

Can anyone suggest some recommendations on the accordion style?
Does something already exist?
Do I need to consider something special? When coding my own behavior; Can I just move everything and then back up, etc.?

Thanks!

+3
source share
4 answers

When I need this type of behavior, I find it TableLayoutPaneluseful. You can set rows and columns to auto size if you have extensible content. That way, when you hide the content, the line crashes.

(, ), .

, , 1 . . ( , - , ). , , .

+4

, , Progressive Disclosure. Microsoft UX .

+6

, , / , / , "..." / "<; < Less Detail".

EDIT: , , / .

+2

If the controls are loose, then yes - you have to move things up or down. You can reduce the amount of work by encapsulating groups of related controls in a panel: then you just need to move the panels. If the panels are docked (for example, "on top"), then just hide / show the panel, and everything should automatically fall into place.

+1
source

Source: https://habr.com/ru/post/1702601/


All Articles