Click here to Skip to main content
16,016,391 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've been asking lots of questions lately in relation to a project I am trying to write.

In simple terms it is a kitchen video system.

The form is divided into available space. When information is received via either Serial or TCP/IP this is then displayed. When info is displayed it goes left to right. You can remove one of these pieces of information to open space up for another bit of information, but the current information must stay in it's current position.

I have chosen a textbox to display as I thought this would be the easiest way for manipulation of the text after it has been received.

I've also chosen the flowlayoutpanel for control adding. I've got the textboxes coming in left to right which is perfect, but as I want to remove textboxes, when an existing textbox is removed, the next textbox (If it fits) should appear in the first open space. At the moment, when a textbox is removed, the textboxes all shift down one spot.

I also want to be able to perform functions on those textboxes aswell such as remove textbox (I've got that one working :)) save text to file amongst anything else in the future.
I've got all of those events programmed as mouse_events on the textbox.

Every control that is displayed with the print job has events, which I have already programmed.

I'm quite happy to put the source code up for what I am doing, or what I currently have anyway.

I'm new to programming, so I am trying my hardest to try and explain what I am trying to achieve.

I've had a lot of people tell me different ways to do things (Which I really appreciate) but I have no idea what they mean.
Posted
Comments
Vedat Ozan Oner 3-Mar-14 2:17am    
it is hard to answer this question since it is quite ambiguous. if you ask it partially (like 'I did this, code is that, but this part doesn't do what I want. It gives .. error. It does this which is not that I want'), your chance to get an answer rises.
Mendaharin 3-Mar-14 3:54am    
I can understand the reason. I'm continually asked why I do things, and then when I put up a post of what the end goal is, no one understands. I'm soo confused.

As per a previous post. I have a flowlayoutpanel, and everything is adding to that fine, but when a textbox is created within that flowlayoutpanel I want it to stay static. I don't want it to move. I'm unsure what part of the flowlayout panel I need to adjust, I don think I need to adjust anything on the textbox side unless you can set a location static property on creation. I just don't know?
Could anyone direct me to something that will show me how to control the flowlayout control? so far this seems the best way to assign locations to new controls, otherwise I need to hold an array of x,y locations which seems to be outside of the scope required.
Richard MacCutchan 3-Mar-14 5:38am    
See Windows Forms Controls Lesson 5: How to use the FlowLayout Panel. As to your general query, that is the problem here, it is too general. We can answer specific programming questions, but it is difficult to visualise your actual problem from the above description. It may be that you are trying something too advanced for your current skill level, and you should try a few simpler projects first.

1 solution

When you insert a textbox in flowlayoutpanel you should set the textbox properties : Flowbreak = True so that your text box will not move.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900