Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

oliverhelm

macrumors newbie
Original poster
Dec 27, 2005
5
0
Hi,
Does any one know how i can colour some of the text in a realBASIC msgBox?
Thanks
 

bobber205

macrumors 68020
Nov 15, 2005
2,182
1
Oregon
I doubt it.

I doubt you can.

If you're really intent on coloring text, come up with your own message box that takes color as a paramater.

I might make one if I have time today.
(I have lots of free time).
 

Les Kern

macrumors 68040
Apr 26, 2002
3,063
76
Alabama
You can always set your globals to handle things like that... here's some sample code I made for a text-base app...

'Dim Header as String
'Dim HDate as String
'Dim TimeStamp, LogEntry as String
'Dim h as new StyledText
'Dim d as new date
'Dim st as Integer
'
'
'//Setup header initiale Attributes
'Header = "Coachstat Journal"
'HDate = d.LongDate
'TimeStamp = d.shorttime + " Entry:"
'LogEntry = " This is how your journal entries will look."
'
'h.Text = Header + EndOfLine + Hdate + EndOfLine + TimeStamp + EndOfLine + LogEntry + EndOfLine
'
'//Set Header Attributes
'h.Bold(0,len(Header)) = True
'h.Size(0,len(Header)) = 18
'h.TextColor(0,len(Header)) = &cff0000
'h.Underline(0,len(Header)) = True
'
'
'st = len(Header) + 1
'//Set Date Attributes
'h.TextColor(st,len(HDate)) = &c000000
'h.Size(st,len(HDate)) = 12
'h.bold(st,len(HDate)) = false
'
'st = st + 1 + len(HDate)
'h.TextColor(st,len(TimeStamp)) = &cFF00FF
'h.Size(st,len(TimeStamp)) = 12
'
'st = st + 1 + len(LogEntry)
'h.TextColor(st, 40) = &c000000
'
'h.Font(0,len(h.text)) = "Comic Sans MS"
'
'HeaderBox.StyledText = h
'
'HeaderBox.StyledText.ParagraphAlignment(0)=Paragraph.AlignCenter
'HeaderBox.StyledText.ParagraphAlignment(1)=Paragraph.AlignCenter
'HeaderBox.StyledText.ParagraphAlignment(2)=Paragraph.AlignLeft
'

Of course you may just need to set one field to have those attributes, so just use "me" and set up a styled text attribute, then equal the call for that attribute to the built in RB colors... like "=&cFFFFFF".
 

oliverhelm

macrumors newbie
Original poster
Dec 27, 2005
5
0
Im using version 5.5.5...
I know it can be done, and simply, cos i have seen it done by a friend in one of there programs, using a standard msg box!
He however is away for a month or two!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.