OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

how to change the color of a selected character?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
icarng
Power User
Power User


Joined: 05 Jan 2004
Posts: 73

PostPosted: Sun Feb 22, 2004 8:16 pm    Post subject: how to change the color of a selected character? Reply with quote

hi all,
i would like to know how can i change the color of a character which the character is supposed to be returned from a separated method.
i have been working on this for long, can anyone help?
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Mon Feb 23, 2004 11:13 am    Post subject: Reply with quote

See this article I wrote...

Altering CharacterProperties of Text
http://www.oooforum.org/forum/viewtopic.php?t=6195

....within lies the answer to your question.
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
icarng
Power User
Power User


Joined: 05 Jan 2004
Posts: 73

PostPosted: Tue Feb 24, 2004 6:27 pm    Post subject: Reply with quote

since i have used oText and oCursor for highlighting a string from a document, i think i may not be able to use the same method to achieve the task.
i wonder if there's any method that can help in changing the color without using oCursor and oText
or is there any method that i can use another oText and oCursor apart from the previous?
Back to top
View user's profile Send private message
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Tue Feb 24, 2004 9:00 pm    Post subject: Reply with quote

You may have any number of text cursors and text objects (only one viewcursor)
Back to top
View user's profile Send private message
icarng
Power User
Power User


Joined: 05 Jan 2004
Posts: 73

PostPosted: Tue Feb 24, 2004 10:04 pm    Post subject: Reply with quote

can you show me a sample?
just like declaring a new variable?
oText1 oText2?
Back to top
View user's profile Send private message
icarng
Power User
Power User


Joined: 05 Jan 2004
Posts: 73

PostPosted: Tue Feb 24, 2004 10:08 pm    Post subject: Reply with quote

or let me put in this way
is it possible for me to change the character properties of a character that is supposed to be shown on dialog box?
Back to top
View user's profile Send private message
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Tue Feb 24, 2004 11:08 pm    Post subject: Reply with quote

Quote:
is it possible for me to change the character properties of a character that is supposed to be shown on dialog box?

I do not think so . I assume that you would be putting the character in a TEXTFIELD control in the dialog ... this only allows a string and not a text object which is what you need to have character formatting.
You may have better luck with a FORM where the textbox control does allow for a text object.
Back to top
View user's profile Send private message
icarng
Power User
Power User


Joined: 05 Jan 2004
Posts: 73

PostPosted: Wed Feb 25, 2004 1:33 am    Post subject: Reply with quote

i just lookfor some articles,
and i discover that VB would have the following codes for changing the color of text
Code:
Text1.ForeColor = vbRed

i m looking for something similar in starbasic, not possible, right?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group