Coloured Text Box

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Coloured Text Box

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:22 pm

by David Mitchell >> Fri, 11 Feb 2000 5:58:01 GMT

Is there any way to make the textbox in Jade have different colours shown at once. Like the code editor does.

I have tried creating a custom control to do this using drawText, but this is very slow. I have also tried using labels created dynamically, but this is no good either. There must be a better way.

--
David Mitchell
JADE Kid - 1998
www.jadekids.com

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Coloured Text Box

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:22 pm

by Craig Shearer >> Tue, 15 Feb 2000 0:07:25 GMT

I'd say you'd be better to find a 3rd party OCX control that does rich text editing. I remember using just such a control several years ago in VB. Can't remember the name of it though.

Craig.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Coloured Text Box

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:22 pm

by Frank Pitt >> Mon, 6 Mar 2000 20:55:51 GMT
Is there any way to make the textbox in Jade have different colours shown at once. Like the code editor does.

I have tried creating a custom control to do this using drawText, but this is very slow. I have also tried using labels created dynamically, but this is no good either. There must be a better way.

Don't know if you've solved this yet David, but have you tried actually using the code editor from the Jade IDE ?

There is an example in the Advanced Developers Course schema which uses this if you need a guide as to how to do it. If you haven't got that I'm sure Arjan or Geoff can give you a copy, it was on the Discovery CD.

Other than this, owner-draw is the only solution, and as Craig said, unless you're keen on writing an Active-X control equivalent yourself, getting a third party one would be the way to go.

Frank Pitt
Mentor / Consultant
Software Education Associates Ltd
Web http://www.softed.com

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Coloured Text Box

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:22 pm

by Frank Pitt >> Tue, 7 Mar 2000 3:18:44 GMT
Don't know if you've solved this yet David, but have you tried actually using the code editor from the Jade IDE ?

There is an example in the Advanced Developers Course schema which uses this if you need a guide as to how to do it. If you haven't got that I'm sure Arjan or Geoff can give you a copy, it was on the Discovery CD.

Whoops!

I was wrong, there _isn't_ an example in the Advanced Developers Course, I was fooled by the fact it looks like the editor window, and sometimes has all red text in it.

After a quick look at the Root schema I suspect that the editor is not accessible from code, so looks like you're stuck with the other options.

Sorry Dave, Arjan.

Frank Pitt
Mentor / Consultant
Software Education Associates Ltd
Web http://www.softed.com

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Coloured Text Box

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:22 pm

by Craig Shearer >> Tue, 7 Mar 2000 18:59:01 GMT

Yes, as far as I know, the JADE Source Code control will be in the JadeSchema which isn't accessable by JADE Developers (except to write their code :-) so it wouldn't be able to be used in a normal application.

Shame really - a while back I developed a "feature" in an application where you could enter some JADE code that you could compile and execute at runtime. This is useful where you want to do something to a deployed system without having to take it down and load in a new method. A code editing control would have been really useful here.

Craig.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 6 guests