Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 GUI drop down selection box
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
who cares?




PostPosted: Thu Oct 09, 2003 9:43 pm   Post subject: GUI drop down selection box

Hey!

Is there any way to create a drop down selection box, maybe using the GUI module. I'm not talking about the Menu command, because you can only use that on the top of the execution window and I don't want that. I'm talking about a drop down selection box that you would typically use in forms on the Internet. Thanks!
Sponsor
Sponsor
Sponsor
sponsor
Mazer




PostPosted: Thu Oct 09, 2003 10:02 pm   Post subject: (No subject)

i remember trying to find one myself last year, but i'm pretty sure there isn't. here's an idea! if you can't find one, try and make your own! could be fun
Tony




PostPosted: Thu Oct 09, 2003 10:04 pm   Post subject: (No subject)

well whenever you want to do something non standart in GUI (or often times even anything in GUI), you can guess what sujestion you're going to get.

Quote:

Write your own

Edit: heh, I wrote this before Mazer made his post Wink

I'm not kidding... look up previous GUI related questions Laughing

Thing is, Turing's GUI sucks. If the schoolwork will ever ease, myself and Dan might write our own... though I'm not promissing anything.

Here's what you do though:

Take MenuBarClass.tu as your base. Make a copy and raname it into MenuFieldClass.tu. Modify load files to include this into the GUI set.

Now you preaty much keep everything the same, but modify where it is to be located.

Notice how GUI uses a LOT of constants. Damn guys over at Holt got lazy and assumed GUI is to be used just in one way Rolling Eyes

code:

Draw.Line (0, maxy, maxx, maxy, black)

        Draw.FillBox (0, menuLine + 1, maxx, maxy - 1,
            WidgetGlobals.MENU_COLOUR)
        Draw.Line (0, menuLine, maxx, menuLine, black)


Thats from the DrawBar method. You'd have to replace all those constants with where you want your box to be created... Such as in relation to X/Y of the mouse when it's right-clicked.

Most importanly, you'd have to modify the choice of the menu item.
code:

if not initialized or not showing or mouseY < menuLine then
            result false
        end if

        selectedMenu := FindMenu (mouseX)


under ConsiderButtonDown.

As you can see, it assumes your menu is in a fixed place and just checks for X value. You'd have to check for both X and Y of created MenuField and buttonDown position.

Would have to play around with FindMenu method...

Those are just some guidelines for modifying existing GUI to make it work. Good luck Wink
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
rizzix




PostPosted: Thu Oct 09, 2003 10:10 pm   Post subject: (No subject)

Actually i won't mind creating my own.. from scratch of course.. i'l make it appear like swing .. well to some extent (it's would take for ever otherwise)..
And quite efficient.. unlike holt's version (full of bugs). yea and only if i have that kind of time.. probably next semester.

o i got a question.. does turing have the ability to redraw only part of the screen?
Tony




PostPosted: Thu Oct 09, 2003 10:22 pm   Post subject: (No subject)

rizzix wrote:
does turing have the ability to redraw only part of the screen?


eh... no Laughing Turing doesn't have anything. Besides, if you're talking about something like 3DSMAX/Maya render part function, then you shouldn't be using turing in first place.

Though I dont quite understand what you mean... Like View.Update just a sertain part of something? I don't quite see any implementations for that Confused
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
rizzix




PostPosted: Thu Oct 09, 2003 10:28 pm   Post subject: (No subject)

exactly! just like view.update but only a part of the screen.

thats quite dissapointing. cuz everytime you click on a button for example. the whole screen refreshes.. which sux.. brings down performance.
who cares?




PostPosted: Fri Oct 10, 2003 7:10 am   Post subject: Thanks!

Thanks for all your responses. Turing sucks Laughing . There is so much stuff that I have tried to do so far but couldn't. It's frustrating. Oh well, I'll figure something out. Might use Radio Buttons.
rizzix




PostPosted: Fri Oct 10, 2003 7:43 am   Post subject: (No subject)

well it's not bad for a beginner but hey it can be and should be imporved. i mean not only redesigned. but be made complete.
Dan




PostPosted: Fri Oct 10, 2003 12:59 pm   Post subject: (No subject)

the funny thing is turing is not realy a progaming langue it is just an app that trasltes poscode in to c++ and comiples it, what is realy funny about this is that it cuts so much out of the languge it was made in and uses. i whonder why they just dont make it so you can put c++ code wirtgh in to the turing comipler to and have it run, since it is all ready using c++ to compile it Rolling Eyes
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Andy




PostPosted: Sat Oct 11, 2003 2:34 pm   Post subject: (No subject)

the next turing version is supposed to have View.UpdateArea and u specify which area u want changed
AsianSensation




PostPosted: Sat Oct 11, 2003 2:34 pm   Post subject: (No subject)

rizzix wrote:
o i got a question.. does turing have the ability to redraw only part of the screen?


I think they do, not now, in the future, something like View.UpdateArea or something, ask dodge_tomahawk, he told me this.

Edit: this is kinda funny, posted at the same time as dodge, even made a reference to him, you would think I possess prescience.
Mazer




PostPosted: Sat Oct 11, 2003 2:55 pm   Post subject: (No subject)

hehe, that was kinda funny.
Andy




PostPosted: Wed Oct 15, 2003 10:34 am   Post subject: (No subject)

damn... ur rite... look at the time at when u posted it, its the exact same as mine... one of us is psychic
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 13 Posts ]
Jump to:   


Style:  
Search: