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

Username:   Password: 
 RegisterRegister   
 highlighting text in graphics mode
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Siavash




PostPosted: Mon May 25, 2009 1:46 pm   Post subject: highlighting text in graphics mode

I've been trying to highlight something with pictures on the screen. Is there any way to highlight text and have images on the screen at the same time? This works in text mode, but in text mode you can't have any pictures on the screen at the same time. In graphics or screen mode you can't highlight any text because it's just pixels.
Sponsor
Sponsor
Sponsor
sponsor
BigBear




PostPosted: Mon May 25, 2009 2:09 pm   Post subject: RE:highlighting text in graphics mode

It only works in text mode
DtY




PostPosted: Mon May 25, 2009 5:24 pm   Post subject: RE:highlighting text in graphics mode

What do you mean by highlight? You can set the background colour in graphics mode.
Siavash




PostPosted: Mon May 25, 2009 6:37 pm   Post subject: RE:highlighting text in graphics mode

I mean when you select text and are able to copy it. it is possible in text mode but how do i get it to work in graphics mode or a mode that allows me to have text and pictures.
BigBear




PostPosted: Mon May 25, 2009 7:01 pm   Post subject: RE:highlighting text in graphics mode

You can print or save it as an image but cannot get text from it
Insectoid




PostPosted: Mon May 25, 2009 7:15 pm   Post subject: RE:highlighting text in graphics mode

With some clever programming you can do it. Might not be worth it, as it would take a lot of work.
Siavash




PostPosted: Mon May 25, 2009 7:21 pm   Post subject: RE:highlighting text in graphics mode

ok, but how???
Dusk Eagle




PostPosted: Mon May 25, 2009 7:27 pm   Post subject: Re: highlighting text in graphics mode

Is this the effect you want?
Turing:

View.Set ("graphics")
Pic.Draw (Pic.FileNew("pic.jpeg"), 100,100, picCopy)
colorback (green)
put "hello world"..
colorback(white) %the .. above and this line stop the green highlight from continuing across the whole screen
Sponsor
Sponsor
Sponsor
sponsor
Siavash




PostPosted: Mon May 25, 2009 7:55 pm   Post subject: RE:highlighting text in graphics mode

no i mean when you highlight text and you can right click and copy the text.
try:
View.Set ("text")
put "hello world"
and you can copy the text

but it doesnt let me use graphics in text mode.

i want something that will let me use graphics but still be able to highlight text and be able to copy it from the program.
Dusk Eagle




PostPosted: Mon May 25, 2009 8:00 pm   Post subject: Re: highlighting text in graphics mode

Is there no way to store what you were going to output to the screen as a string instead? You could then just pass the string along (or open a new window using View.Set ("text") and output the string).
Insectoid




PostPosted: Mon May 25, 2009 8:01 pm   Post subject: RE:highlighting text in graphics mode

I'm afraid that may be beyond what you have yet learned. It involves creating your own textbox and everything, which is q bit advanced.
saltpro15




PostPosted: Mon May 25, 2009 8:07 pm   Post subject: RE:highlighting text in graphics mode

does this work, basically just coding what Dusk Eagle said

Turing:

setscreen ("graphics")
drawfillbox (10, 10, 200, 200, black)
var winID : int
winID := Window.Open ("text")
put "hello world"
BigBear




PostPosted: Mon May 25, 2009 9:14 pm   Post subject: RE:highlighting text in graphics mode

That would open a new window and if it is just setscreen ("text") it cls' all the graphics
Siavash




PostPosted: Mon May 25, 2009 9:25 pm   Post subject: RE:highlighting text in graphics mode

Thanks insectoid
I am just not very familiar with text since i have only done pixel graphics

anyway your text box idea will work really well for me Smile
Kharybdis




PostPosted: Tue May 26, 2009 7:46 am   Post subject: RE:highlighting text in graphics mode

Making your own GUI would be hard... just a warning. or at least .. good GUI ...
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  [ 15 Posts ]
Jump to:   


Style:  
Search: