开发者

control to show steps to do something in winforms

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 suitabl开发者_JAVA百科e 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.


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.


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);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜