3

i want to show steps on how to cook something in winform c# .net as steps. Something like a set of text area would be nice but:

-> list box considers the whole string of one step as one item so user needs to scroll horizontally to view the whole step.

-> datagridview is also not suitable as i want the text to word wrapped.

i also want the user to be able to edit the step. any suggestions of custom control would be nice.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
PUG
  • 4,301
  • 13
  • 73
  • 115
  • possible duplicate of [Controlling user workflow in Winforms](http://stackoverflow.com/questions/2064196/controlling-user-workflow-in-winforms) – Hans Passant Oct 12 '11 at 08:40

2 Answers2

2

Maybe a wizard like app would be suitable for you. AFAIK there's no native wizard control in C# but you could implement one using tabs or using one of many in the web.

David Hall
  • 32,624
  • 10
  • 90
  • 127
Jorge Zapata
  • 2,316
  • 1
  • 30
  • 57
0

A multi line text box will do the job great. just take a simple text box and do the following to it, and it will turn to a text area:

                     TextBox listBoxNewInput  = new TextBox();
                    //Initialize label's property

                    listBoxNewInput.Multiline = true;
                    // Add vertical scroll bars to the TextBox control.
                    listBoxNewInput.ScrollBars = ScrollBars.Vertical;
                    // Allow the RETURN key in the TextBox control.
                    listBoxNewInput.AcceptsReturn = true;
                    // Allow the TAB key to be entered in the TextBox control.
                    listBoxNewInput.AcceptsTab = true;
                    // Set WordWrap to true to allow text to wrap to the next line.
                    listBoxNewInput.WordWrap = true;

                    listBoxNewInput.Width = 315;
                    listBoxNewInput.Height = 150;
                    listBoxNewInput.DoubleClick += new EventHandler(listBoxNewInput_DoubleClick);

                    flowLayoutPanel1.FlowDirection = FlowDirection.TopDown;
                    flowLayoutPanel1.Controls.Add(labelInput);
                    flowLayoutPanel1.FlowDirection = FlowDirection.TopDown;
                    flowLayoutPanel1.Controls.Add(list

BoxNewInput);

PUG
  • 4,301
  • 13
  • 73
  • 115