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

Username:   Password: 
 RegisterRegister   
 Custom GUI
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
JSBN




PostPosted: Thu Jun 19, 2003 11:31 am   Post subject: Custom GUI

Yes, I Do realize that there is a tutorial, but it didn't tackle my problem. OK Here it is:
I have TextFeilds. And i want their background color(usually white) to be blue. I have tried many different things and edited TEXTFLD.tu many times, and i found that there was no result in my actions. At one point i even tried deleting the file, yet the bloody text feilds still drew themselves in white. If some1 could shed some light on me delemma, i would appreciate it.

thx, JSBN
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Jun 19, 2003 12:58 pm   Post subject: (No subject)

you were looking in the wrong file Laughing

go to TextFieldClass.tu, scroll down to
code:

    procedure DrawText
        if colourbg = black and backgroundColour not= colourbg then
            Draw.FillBox (x1, y1, x2, y2, blue)%brightwhite)
        else
            Draw.FillBox (x1, y1, x2, y2, blue)% colourbg)
        end if
        View.ClipSet (x1, y1, x2, y2)
        Font.Draw (text, x1 - xOffset, y1 + fontDescent, textFontID,
            foregroundColour)
        View.ClipOff
    end DrawText


Thouse are the Draw.FillBox commands that draw your box... Oh, also if you change the value of foregroundColor you'll be able to have font of a different color to display nicely on blue (black on blue sucks).

Enjoy
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
JSBN




PostPosted: Thu Jun 19, 2003 1:04 pm   Post subject: (No subject)

Works perfectly! THX alot tony
Asok




PostPosted: Thu Jun 19, 2003 3:36 pm   Post subject: (No subject)

JSBN, it doesn't work in the version you sent me today.

editing those externals will only work on your machine. (it'll work in an exe because it packs the externals in it) if it's working on your box, make it an exe and send it to me.
JSBN




PostPosted: Thu Jun 19, 2003 4:31 pm   Post subject: (No subject)

Yea, i'll send u my edited file. U gotta wait tho, i am in a cyber cafe right now :/
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  [ 5 Posts ]
Jump to:   


Style:  
Search: