How to color a string ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

How to color a string ?

Ankita Srivastava
In CwMessagePrompter class i want to change the color of the message string to red or green. In below example I want the message to be displayed in red or green.
CwMessagePrompter
                message: 'This is a test of #message:title:iconType: '
                title: 'an unimaginative title'
                iconType: nil

 Is it possible ? if yes, please let me know the solution.

A quick reply is highly appreciated.

Thank you.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to color a string ?

Seth Berman
Hello Ankita,

On Windows, the CwMessagePrompter is just a small wrapper around to what is essentially a configured call to the Windows MessageBox function.
For whatever reason, the styling capability that you want is not exposed by windows.  You would need to create a custom control that looks and acts
like a message box, but has this extended capability.
The following from the MS site shows the full capabilities of a MessageBox
https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

-- Seth

On Tuesday, April 11, 2017 at 4:56:33 PM UTC-4, Ankita Srivastava wrote:
In CwMessagePrompter class i want to change the color of the message string to red or green. In below example I want the message to be displayed in red or green.
CwMessagePrompter
                message: 'This is a test of #message:title:iconType: '
                title: 'an unimaginative title'
                iconType: nil

 Is it possible ? if yes, please let me know the solution.

A quick reply is highly appreciated.

Thank you.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to color a string ?

Long Haired David
In reply to this post by Ankita Srivastava
We have a coloured button that might help. I will fish out the code and put it on our web site - probably tomorrow.
You may be able to see how we did the colouring and apply it to your problem.
David

On Tuesday, April 11, 2017 at 9:56:33 PM UTC+1, Ankita Srivastava wrote:
In CwMessagePrompter class i want to change the color of the message string to red or green. In below example I want the message to be displayed in red or green.
CwMessagePrompter
                message: 'This is a test of #message:title:iconType: '
                title: 'an unimaginative title'
                iconType: nil

 Is it possible ? if yes, please let me know the solution.

A quick reply is highly appreciated.

Thank you.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
David
Totally Objects
Doing Smalltalk since 1989
Reply | Threaded
Open this post in threaded view
|

Re: How to color a string ?

Long Haired David
In reply to this post by Ankita Srivastava
OK I have put our coloured button app on Dropbox - http://bit.ly/2p74JVr - you may be able to glean something from that.

David

On Tuesday, April 11, 2017 at 9:56:33 PM UTC+1, Ankita Srivastava wrote:
In CwMessagePrompter class i want to change the color of the message string to red or green. In below example I want the message to be displayed in red or green.
CwMessagePrompter
                message: 'This is a test of #message:title:iconType: '
                title: 'an unimaginative title'
                iconType: nil

 Is it possible ? if yes, please let me know the solution.

A quick reply is highly appreciated.

Thank you.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
David
Totally Objects
Doing Smalltalk since 1989
Reply | Threaded
Open this post in threaded view
|

Re: How to color a string ?

Ankita Srivastava
In reply to this post by Seth Berman
Thank you so much Seth for your quick reply. We are planning the same for our application.

On Wednesday, April 12, 2017 at 10:29:36 PM UTC+5:30, Seth Berman wrote:
Hello Ankita,

On Windows, the CwMessagePrompter is just a small wrapper around to what is essentially a configured call to the Windows MessageBox function.
For whatever reason, the styling capability that you want is not exposed by windows.  You would need to create a custom control that looks and acts
like a message box, but has this extended capability.
The following from the MS site shows the full capabilities of a MessageBox
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505%28v=vs.85%29.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fwindows%2Fdesktop%2Fms645505%2528v%3Dvs.85%2529.aspx%3Ff%3D255%26MSPPError%3D-2147217396\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFidKyaDjqq-A5NSZe5u0qCzYgoPQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fwindows%2Fdesktop%2Fms645505%2528v%3Dvs.85%2529.aspx%3Ff%3D255%26MSPPError%3D-2147217396\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFidKyaDjqq-A5NSZe5u0qCzYgoPQ&#39;;return true;">https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

-- Seth

On Tuesday, April 11, 2017 at 4:56:33 PM UTC-4, Ankita Srivastava wrote:
In CwMessagePrompter class i want to change the color of the message string to red or green. In below example I want the message to be displayed in red or green.
CwMessagePrompter
                message: 'This is a test of #message:title:iconType: '
                title: 'an unimaginative title'
                iconType: nil

 Is it possible ? if yes, please let me know the solution.

A quick reply is highly appreciated.

Thank you.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to color a string ?

Ankita Srivastava
In reply to this post by Long Haired David
Hi David,
I am not able to open the link below. Could you please check is it the right and is any special browser needed for this.
Thank you.

On Thursday, April 13, 2017 at 1:13:32 AM UTC+5:30, Totally Objects wrote:
OK I have put our coloured button app on Dropbox - <a href="http://bit.ly/2p74JVr" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fbit.ly%2F2p74JVr\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGd9ZBMsE72vtVp8mcx9MAxAmklqQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fbit.ly%2F2p74JVr\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGd9ZBMsE72vtVp8mcx9MAxAmklqQ&#39;;return true;">http://bit.ly/2p74JVr - you may be able to glean something from that.

David

On Tuesday, April 11, 2017 at 9:56:33 PM UTC+1, Ankita Srivastava wrote:
In CwMessagePrompter class i want to change the color of the message string to red or green. In below example I want the message to be displayed in red or green.
CwMessagePrompter
                message: 'This is a test of #message:title:iconType: '
                title: 'an unimaginative title'
                iconType: nil

 Is it possible ? if yes, please let me know the solution.

A quick reply is highly appreciated.

Thank you.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to color a string ?

Ankita Srivastava
In reply to this post by Ankita Srivastava


On Wednesday, April 12, 2017 at 2:26:33 AM UTC+5:30, Ankita Srivastava wrote:
In CwMessagePrompter class i want to change the color of the message string to red or green. In below example I want the message to be displayed in red or green.
CwMessagePrompter
                message: 'This is a test of #message:title:iconType: '
                title: 'an unimaginative title'
                iconType: nil

 Is it possible ? if yes, please let me know the solution.

A quick reply is highly appreciated.

Thank you.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to color a string ?

Santiago Cardoso Geller-3
Hi Ankita. The link is working ok. Is in dropbox 

2017-04-13 8:29 GMT-03:00 Ankita Srivastava <[hidden email]>:


On Wednesday, April 12, 2017 at 2:26:33 AM UTC+5:30, Ankita Srivastava wrote:
In CwMessagePrompter class i want to change the color of the message string to red or green. In below example I want the message to be displayed in red or green.
CwMessagePrompter
                message: 'This is a test of #message:title:iconType: '
                title: 'an unimaginative title'
                iconType: nil

 Is it possible ? if yes, please let me know the solution.

A quick reply is highly appreciated.

Thank you.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to color a string ?

Long Haired David
In reply to this post by Ankita Srivastava
If you see this:


Then just click on the Download. There is nothing else to see.

David



On Thursday, April 13, 2017 at 12:22:15 PM UTC+1, Ankita Srivastava wrote:
Hi David,
I am not able to open the link below. Could you please check is it the right url and is any special browser needed for this.
Thank you.

On Thursday, April 13, 2017 at 1:13:32 AM UTC+5:30, Totally Objects wrote:
OK I have put our coloured button app on Dropbox - <a href="http://bit.ly/2p74JVr" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fbit.ly%2F2p74JVr\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGd9ZBMsE72vtVp8mcx9MAxAmklqQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fbit.ly%2F2p74JVr\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGd9ZBMsE72vtVp8mcx9MAxAmklqQ&#39;;return true;">http://bit.ly/2p74JVr - you may be able to glean something from that.

David

On Tuesday, April 11, 2017 at 9:56:33 PM UTC+1, Ankita Srivastava wrote:
In CwMessagePrompter class i want to change the color of the message string to red or green. In below example I want the message to be displayed in red or green.
CwMessagePrompter
                message: 'This is a test of #message:title:iconType: '
                title: 'an unimaginative title'
                iconType: nil

 Is it possible ? if yes, please let me know the solution.

A quick reply is highly appreciated.

Thank you.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
David
Totally Objects
Doing Smalltalk since 1989
Reply | Threaded
Open this post in threaded view
|

Re: How to color a string ?

Long Haired David
In reply to this post by Ankita Srivastava
Try downloading a zip from here - http://www.totallyobjects.com/images/cb.dat.zip
David

On Tuesday, April 11, 2017 at 9:56:33 PM UTC+1, Ankita Srivastava wrote:
In CwMessagePrompter class i want to change the color of the message string to red or green. In below example I want the message to be displayed in red or green.
CwMessagePrompter
                message: 'This is a test of #message:title:iconType: '
                title: 'an unimaginative title'
                iconType: nil

 Is it possible ? if yes, please let me know the solution.

A quick reply is highly appreciated.

Thank you.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
David
Totally Objects
Doing Smalltalk since 1989