How to use a text box for display only.

Support forum for MegunoLink
TrevorTighe
Posts: 1
Joined: Tue Aug 26, 2014 4:09 am

Tue Aug 26, 2014 4:18 am

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.
jgrina
Posts: 8
Joined: Mon Aug 18, 2014 5:38 am

Sat Aug 30, 2014 6:02 am

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
admin
Site Admin
Posts: 20
Joined: Mon May 26, 2014 10:53 am

Sat Aug 30, 2014 6:52 am

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.
admin
Site Admin
Posts: 20
Joined: Mon May 26, 2014 10:53 am

Sat Aug 30, 2014 6:54 am

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.
jgrina
Posts: 8
Joined: Mon Aug 18, 2014 5:38 am

Tue Nov 18, 2014 6:55 am

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
Paul
Posts: 33
Joined: Wed Jun 10, 2015 10:35 pm

Wed Jun 10, 2015 10:41 pm

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.
jwhitten
Posts: 6
Joined: Sun Jul 05, 2015 5:54 pm

Sun Jul 05, 2015 6:05 pm

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.
Joe
Posts: 24
Joined: Wed Jun 22, 2016 8:18 am

Sun Feb 05, 2017 12:45 pm

Any news on how to implement a dynamically colour change of the text?
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Mon Feb 06, 2017 10:30 pm

Hi Joe, this still isn't possible but we are looking at adding it soon.

Cheers
Phil
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Thu Mar 16, 2017 12:46 am

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
Post Reply