can any one help plz
hey, im having some trouble with a uni project in workin on
basically im making a kind of fast food ordering system in vb, ive got all the basics out of the way but what i want to do now is have a little section on each page telling the cashier what is currently in the order i.e. a little box in the top left saying what is in the order so far.
the only problem is im not sure how to do this, would it be possible to use a list box or something like that. the variable that the order is stored in is called 'order'.
if anyone can help me out that would be great
pete
[613 byte] By [
PeteG] at [2007-11-11 7:39:24]

# 1 Re: can any one help plz
if the order is only one item a Label will be enough, otherwise a ListBox is fine
Marco
mstraf at 2007-11-11 17:26:37 >

# 2 Re: can any one help plz
the order could be a number of items though.
what code would you need to list it in the list box though, thats what im not sure about you see
pete
PeteG at 2007-11-11 17:27:37 >

# 3 Re: can any one help plz
what type the variable 'order' is?
Marco
mstraf at 2007-11-11 17:28:46 >

# 4 Re: can any one help plz
the variable is a string
PeteG at 2007-11-11 17:29:40 >

# 5 Re: can any one help plz
Depends on how you stored the items in the string. If each item is on its own line (seperated by a carriage return), then you need to SPLIT the string and the add those items to the listbox.
However, if they are separated by a carriage return, you could just put a multi-line textbox (set to Read-Only) and assign the string. Each item will get put on its own line.
If you aren't separating your items by carriage return, how do you separate them? That will affect the code to put it into a listbox or textbox.
# 6 Re: can any one help plz
yes there is a break in the line after every item, this multi lined text box of yours sounds a good idea. how might one code that?
pete
PeteG at 2007-11-11 17:31:40 >

# 7 Re: can any one help plz
No need of a textBox. Just use a Label, set the AutoSize property to True, and assign the Caption property:
myLabel.Caption = order
and the label magically will resize itself
Marco
mstraf at 2007-11-11 17:32:44 >

# 8 Re: can any one help plz
thank you very much for your help, its most appreciated
i shall go try it right now
thanks again
pete
PeteG at 2007-11-11 17:33:47 >

# 9 Re: can any one help plz
slight problem, its telling me that the .Caption option cant be used with a text box or label, any ideas?
pete
PeteG at 2007-11-11 17:34:44 >

# 10 Re: can any one help plz
"Caption" is a property of the VB6 Label control. In VB.NET, it is called "Text" (like in all other controls)
What are you using?
Marco
mstraf at 2007-11-11 17:35:45 >

# 11 Re: can any one help plz
thanks for that, but what code would you use if there wasnt a break between each value in the order variable because the order is just showing up on one line, is there a way to break it up onto separate lines?
in using .net by the way, sorry should have mentioned that at the start
i really do appreciate your help
pete
PeteG at 2007-11-11 17:36:51 >

# 12 Re: can any one help plz
For .NET technical questions, next time post here
http://forums.dev-archive.com/forumdisplay.php?f=120
Is there are special characters between the items? If yes use the Split function, otherwise use the WordWrap property
Marco
mstraf at 2007-11-11 17:37:49 >
