Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
Which form element can do the following:
- I press the button, the "additional" part of the form unfolds to the right.
Once I saw something like that, but I do not remember where.
I try to do it with "ToolStripPanel", but it does not work ...
"ToolStripPanel" makes the "red" panel expand to the "blue" territory.
It does not suit me.
What element of the form to use so that the “red” was of a constant size, and the “blue”
part was unwrapped and rolled up so that the form would increase and decrease?
image - link
According to your image, you could use a SplitContainer but what you see is a 2-step action. First, remove the panel 2, then resize panel 1 to take the newfound space.
Another option is to gradually decrease the size of panel 2, hence giving the illusion of "unfolding"
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
so I'm making a chat room, and it has several different scenes. However, for maximum efficiency, I need to have a clean workspace. However, the start here:
First scene. Is hard to have in the background when I'm placing stuff around. I know how to hide it once it runs, but is there any way to keep it alive, but invisible when I'm editing?
No there is no that possibility but there are 3 others (second one i do not prefer and would NEVER use but it is possible)
So you want to hide some elements in editing process because you are doing something behind them. From picture i see that first one is some kind of login form. So these are solutions:
1. Creating another form
So most common and practical is creating another form.
Simply create form with right click on your solution explorer > new > Windows Form
Then call it with buttons
Calling:
NewForm nf = new NewForm();
nf.Show();
this.Close();
2. Temporary moving it off
So idea is to move controls to the side in editing mode and then when you run program you set their location by code with simply doing button1.Location = new Point(15, 15);
3. Using TabPage
Create TabPage with 3 tabs.
First one are buttons, Second is if user want to create third if want to join.
Add this to your tab so it looks better and have no buttons at top (to user swich tabs)
tabControl.Appearance = TabAppearance.FlatButtons;
tabControl.ItemSize = new Size(0, 1);
tabControl.SizeMode = TabSizeMode.Fixed;
Then on button go to specific tab and boom.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
when I put a breakpoints on my textbox it shows textbox.length = "" even if there are characters in the textbox
There is no Length property present in TextBox Class.
Probably you mean to Check the Length on Textbox Text property which is of string type.
textbox.Text.Length
More info about the code would be nice. Is your Textbox really enabled? No transparent layer in front of it? You used the mySQL-Tag. Does that mean you use some kind of binding in textbox? Possibly you can't change the content of your textbox, because the database-binding / connection is read-only?
Is there really some textbox.length property?? Are you sure you are referring to the right property? Try this:
Convert.ToString(textBox1.TextLength)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
http://i.stack.imgur.com/Hi9Iz.jpg
i am trying to create a table in c# which should look like at example above and it should be usable in a loop. example: i have two variables called "text" and "author" big box belongs to text and right bottom box belongs to author. those variables available in a loop. what i want to is fill those boxes and make it compatible with loop. i managed to solve this with textboxes but i couldn't figure out how to make them stay under another one.
The easier way (that i am aware of) to do what you want is with an usercontrols and a flowLayoutPanel so we do it as follow
Create an UserControl
create it with panels or textBox in the way you want your table to be, i did like so
Create a flowLayoutPanel
put it where you like it to be and set those properties
this.flowLayoutPanel1.AutoScroll = true;
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowLayoutPanel1.WrapContents = false;
add as much table like UserControl you want in it the result should be as follow
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to make like a container application where you can drag and drop files of any kind on the form and afterwards to be able to open it from there. I found some solutions where you can drag and drop files to a list view and you get it's path.. but is not how I want.. I want to have on my form in a panel or what ever is better like a shortcut of the file, an image or something to be able to see the file icon like is in explorer.
Have someone ever done something like this or point me to the right direction?
Set "Allow drop" property to "true" on your control and make use of Control.DragDrop event - it's exist on all controls, and it's invoked after drag'n'drop anything on anything(if "Allow drop" is true of course).
It this event-handler you can add new item to this or another control(ListView fits nicely to your needs), and for example to some "Dictionary" where you will store "Item and filename mapping".
Also you need to make handler for item click'ing - for ListView there a ItemActivate event. Inside this handler you can click execute default shell-action for this file by using Process.Start
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
In my current project I want to implement a checkbox that, if checked, replaces all strings in labels, tabs, etc. currently being shown on a form with a different string.
For example, If checked, all instances of the word "car" would change to the word "truck" all through out the program.
I'd rather not go through a do a .replace on every single string in the code. I was wondering if there was some way to "intercept" output strings and replace them on the fly; something like making a string-listener. Any help would be appreciated!
I am no GUI/WinForms program but this would be my personal approach. Add all of these UI elements to a List<T> in the forms constructor. Then in the "replace box checked event handler" you can just iterate over the list applying the same change to all the items. It's by no means a perfect solution but it does mean you only have to statically reference each of the items once. After they're in the list you can operate on all of them very easily.