Computer Science Canada

GUI stuff

Author:  BoyGenius [ Mon May 05, 2003 6:51 pm ]
Post subject:  GUI stuff

i dont think that the tutorial for using message box is there. so if not then can u tell me how to use a message box

Author:  nate [ Mon May 05, 2003 8:09 pm ]
Post subject:  What do you mean?

By message box do you mean like a text feild?

Be more exact!

-Nathan

Author:  Tony [ Mon May 05, 2003 8:40 pm ]
Post subject: 

he probly means like a pop-up message box.

It's suppost to be GUI.Alert but it keeps on telling me that its not an export of GUI module. I think holt screwed up on that.

You could write a custom one. Just pop up a new window and put a button there. For button prosedure just terminate the window.

Author:  Homer_simpson [ Mon May 05, 2003 8:47 pm ]
Post subject: 

yeah same here a lotta gui commands wont work =S

Author:  BoyGenius [ Tue May 06, 2003 10:13 am ]
Post subject: 

k i can do that, mean i can setup another window and a button on it (OK) then when the user clicks on it how would i make that window disapper and return to the main window

Author:  Prince [ Tue May 06, 2003 10:15 am ]
Post subject: 

use GUI.Hide (i think)... if it works it'll make the window disappear

Author:  BoyGenius [ Tue May 06, 2003 10:33 am ]
Post subject: 

I did it. And it didnt work. it gave me an error about an argument ..

any other ways i can make it disapper and return to the main window ?

Author:  Prince [ Tue May 06, 2003 7:01 pm ]
Post subject: 

wait, i think i misread the question... Window.Close should close the window and using Window.Select (winID) would bring it back to the main window... jus remember wat variable name u used 2 open the first window and switch it with winID

code:

Window.Close (win2)
Window.Select (win1)


sumthin like dat

Author:  BoyGenius [ Thu May 08, 2003 7:06 pm ]
Post subject: 

k i am doing a chaos game, i did most of it, but i am getting stuck one point. k like when the user clicks three points on the canvas + another point (which goes around the place creating the image), wat do I use ?

Author:  Delta [ Fri May 09, 2003 8:46 am ]
Post subject: 

Well from what I got you guys are stuck somewhere between GUI's and Window's so here is what I think may help you...I think...

To close a window '''Window.Close (winID)''' which you already had
To open a window '''Window.Open("graphics:800;600")'''
To hide a window '''Window.Hide(winID)'''
TO show a window '''Window.Show(winID)'''

Author:  Office of the Registar [ Fri May 09, 2003 8:56 am ]
Post subject: 

don't you just put the dots on the canvas?

Author:  Delta [ Fri May 09, 2003 9:01 am ]
Post subject: 

...? Explain?

Author:  BoyGenius [ Fri May 09, 2003 10:21 am ]
Post subject: 

k like you are given a set of options like how many corner you want -- 3,4,5,6. the user clicks on any of the radio buttons and the user clis on the canvas. like ex. he selects 3 and so he clicks 3 dots on the canvas + another dot. now i also have a draw button. So how do get the coordiantes and in which procedure -- mousedown, mousedrag, mouseUp.

Author:  MysticAngel [ Fri May 09, 2003 12:57 pm ]
Post subject: 

well the coordinates that you get go into mouseDown. The calculations for the distance and the other stuff go into your draw button procedure.

Author:  MysticAngel [ Fri May 09, 2003 1:02 pm ]
Post subject: 

you also need the mouseDrag and mouseUp, but you dont write anything in it. you just call them in your GUI.CreateCanvasFull.in ur mouseDown procedure just draw an oval and say like mousex := x and mousey := y
in ur Draw procedure (or watever it is that u have called ) just calcualte the distance like x := round ((x-x1) * distance + x1) for x and y and for all the corner that you have got. you can use a case statement it is much easier that way


: