Page 1 of 2

How to use a text box for display only.

Posted: Tue Aug 26, 2014 4:18 am
by TrevorTighe
When a Interface pannel is displayed, can I stop the user from putting the cursor inside a textbox. By making it Disabled I loose the ability to set a colour.
Maybe allowing a Labelbox to be modified like a textbox would fix the cursor issue.
Are you intending to allow changes to more properties at run time, ie change 'colour' or 'visible' etc.

Re: How to use a text box for display only.

Posted: Sat Aug 30, 2014 6:02 am
by jgrina
I would also like to see a color change option for text boxes. I searched through all the documentation but couldn't find it. However, since this is derived from Visual Studio, I think it is quite reasonable to do.

Jim

Re: How to use a text box for display only.

Posted: Sat Aug 30, 2014 6:52 am
by admin
Hi TrevorTighe,

It sounds like you want a read-only text box. So you can send information from the Arduino, but the user can't edit. Just set the read-only property to true in the designer; its under the "Behavior" group.

Changing colours/ visibility is something we have been wondering about. How would you use such a feature?

Paul.

Re: How to use a text box for display only.

Posted: Sat Aug 30, 2014 6:54 am
by admin
jgrina wrote:I would also like to see a color change option for text boxes. I searched through all the documentation but couldn't find it. However, since this is derived from Visual Studio, I think it is quite reasonable to do.

Jim
Yep. Just open the designer, select your text box and use the property window on the left side to set the background and foreground colors. Both are in the Appearance group. You can change the font size too

Paul.

Re: How to use a text box for display only.

Posted: Tue Nov 18, 2014 6:55 am
by jgrina
Yep. Just open the designer, select your text box and use the property window on the left side to set the background and foreground colors. Both are in the Appearance group. You can change the font size too

Paul.


I,d like to see dynamic change, a color attribute in the "SetText(ControlName, Value) commands like
SetText(ControlName, Value, Color); at 20 degrees F, i would use blue text, then as temperature readings rose, i'd switch to green text, then at over 100 degrees F, i would change to red text. You do that for plotting data, and I'm pretty sure that it can be added to textboxes as well.

Jim

Re: How to use a text box for display only.

Posted: Wed Jun 10, 2015 10:41 pm
by Paul
If you make the text box read-only the user won't be able to type anything in it. They can still select and copy the text though.

Re: How to use a text box for display only.

Posted: Sun Jul 05, 2015 6:05 pm
by jwhitten
jgrina wrote:Yep. Just open the designer, select your text box and use the property window on the left side to set the background and foreground colors. Both are in the Appearance group. You can change the font size too

Paul.


I,d like to see dynamic change, a color attribute in the "SetText(ControlName, Value) commands like
SetText(ControlName, Value, Color); at 20 degrees F, i would use blue text, then as temperature readings rose, i'd switch to green text, then at over 100 degrees F, i would change to red text. You do that for plotting data, and I'm pretty sure that it can be added to textboxes as well.

Jim
I can see the usefulness of being able to select color / font programatically, and even visibility. The example given above is pretty good in this regard. Another might be a text box which is being used to watch a value and noting that it is getting near the limit. Or a text box which is being used to provide status messages to the user and to make a note of a dangerous condition, etc.

Re: How to use a text box for display only.

Posted: Sun Feb 05, 2017 12:45 pm
by Joe
Any news on how to implement a dynamically colour change of the text?

Re: How to use a text box for display only.

Posted: Mon Feb 06, 2017 10:30 pm
by philr
Hi Joe, this still isn't possible but we are looking at adding it soon.

Cheers
Phil

Re: How to use a text box for display only.

Posted: Thu Mar 16, 2017 12:46 am
by philr
Hi Guys, we just pushed out a release which features the ability to adjust colors, and control the enabled and visible properties of controls.

You can get the latest Arduino Library from here or our installer which has methods for adjusting these properties.
https://github.com/Megunolink/MLP

You can find the different properties in a table on this page
http://www.megunolink.com/documentation ... ace-panel/

Play around with the controls in the interface panel editor to figure out what they do for each control then control them from the Arduino (serial connection) accordingly.

Cheers
Phil