Fonts / Colors / Bold / Italic

Sunday, October 30, 2005 by RomanDA | Discussion: DesktopX

Hey all.. need some help..

I'm working on a widget/gadget and its going to be showing a bunch of text that is being read from somewhere else, formatted and put together into one big text string. Here is my problem(s).

I need to be able to change PART of this string to look like this:

Name1 Name2
Name3 Name4

And i also would like to change some color too. Is this possible?
I would hope that DX could use font size/color/etc.

If this is answered somewhere else PLEASE let me know.
I'm going to Google the crap out of the web to see.

Thanks all!
RomanDA
MountainDragon
Reply #1 Sunday, October 30, 2005 5:33 PM
The good news: You can change the font characteristics for DX text objects, either in the properties dialog or by script.

The bad news: AFAIK, it only applies to the entire object.

If you want different portions of your string to have different font options, I think you will need to use multiple objects, and just position them to achieve the effect you want.

DX documentation:

Link
RomanDA
Reply #2 Sunday, October 30, 2005 5:44 PM
problem is that wont work well.. its a list that can change length over and over.

Its a list of sports scores, and it will change over time, some going away some being added.
Its a pain to have to create a ton of objects for this simple operation.
thomassen
Reply #3 Sunday, October 30, 2005 6:09 PM
Unless you need the background of the text to be transparent you can use the rich edit control. If you need/want the background to the texturized/background image you could use the IE control. (With the IE control you can even make it editable as well)
RomanDA
Reply #4 Sunday, October 30, 2005 6:14 PM
Do you have an example of the "rich edit control"?
MountainDragon
Reply #5 Monday, October 31, 2005 12:28 PM
After trying to use them myself, it appears that the font properties for script access do not work properly. For instance, the Object.FontName property seems to be read-only, despite what the docs say, and the Object.FontSize property returns False, which if applied to a font, makes it really small!
thomassen
Reply #6 Monday, October 31, 2005 12:37 PM
Yes, the docs are wrong. Only SetFont works. Which forces you to define all the font properties. Quite akward.
RomanDA
Reply #7 Monday, October 31, 2005 12:38 PM
Thanks MD...

I found a widget that used a web page that was being generated by a script in the object. I was able to make it work, now i need to figure out how to work out the scrolling problems..

Since its a list of games, if you are watching game 5 and you scroll over to it, you want it to stay on game 5 even when it refreshes the HTML page.

Anyone know how to find out what the scrolling is on an html box, and restore to that position?

I was thinking something like bookmarks?
thomassen
Reply #8 Monday, October 31, 2005 12:57 PM
Do you have an example of the "rich edit control"?

Not on how to use it from DX, no. It's called "Microsoft Rich Textbox Control" in the list of ActiveX controls.

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01