enumFlapjack{Crispy,Soggy,Browned,Bannana}classLumberjack{private string name;public string Name{ get {return name;}}privateStack<Flapjack> meal;publicLumberjack(string name){this.name = name;
meal =newStack<Flapjack>();}publicintFlapjackCount{ get {return meal.Count;}}publicvoidTakeFlapjacks(Flapjack food,int howMany){for(int i =0; i < howMany; i++){
meal.Push(food);}}publicvoidEatFlapjacks(){Console.WriteLine(name +"'s eating flapjacks");while(meal.Count>0){Console.WriteLine(name +" ate a "+ meal.Pop().ToString().ToLower()+" flapjack");}}}
The problem here i'm getting is in Form1 under RedrawList() ---> nextInLine TextBox should display what ever nextInLine.Text line is equal to but nothing is being displayed in the textbox during execution, up on button click of Add flapjacks it will call RedrawList () and a mesage should be displayed in the textbox like if name = ed and howMany = 3 text displaayed should be "Ed has 3 flapjacks" not no display upon button click.
I have set the property of the textbox to Read only,
Question
Ch33f
Here is what the form looks like and its respective toolbox item name
Form and it's names
Here's the code for the Form and the class
CLASS:
The problem here i'm getting is in Form1 under RedrawList() ---> nextInLine TextBox should display what ever nextInLine.Text line is equal to but nothing is being displayed in the textbox during execution, up on button click of Add flapjacks it will call RedrawList () and a mesage should be displayed in the textbox like if name = ed and howMany = 3 text displaayed should be "Ed has 3 flapjacks" not no display upon button click.
I have set the property of the textbox to Read only,
Any Idea why there is no text in textbox ?
Link to comment
https://www.neowin.net/forum/topic/1329156-text-not-appearing-in-textbox/Share on other sites
3 answers to this question
Recommended Posts