Textbox

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
daoa80
Posts: 44
Joined: Fri Aug 10, 2012 8:50 am

Textbox

Post by daoa80 »

How can we add scrollbars to a textbox?


Thanks

Doug H.
Posts: 4
Joined: Tue Jul 29, 2014 3:08 pm
Location: Salt Lake City, UT

Re: Textbox

Post by Doug H. »

Hello,

There is a way to do this without scripting. What you can do is use an AnimatedLabel object from the objects drop down menu (see screenshot1).

Then while you have the AnimatedLabel object selected go to the Property Grid on the right and click on the Animation speed advanced settings button (see screenshot2).

In the advanced settings menu make sure you have the Animation speed selection highlighted on the left side. Change the converter from the Linear Converter to the Raw Converter. Put in a new Tag that is not used anywhere else. In the Default Value Used In Design Mode box put in a value for the scroll speed, I recommend 3000 (see screenshot3).

Now you will need to change the selection on the left to Animated. In this selection you will not need or be able to change the converter so leave it as is. Put in another new Tag, this one will be used again. The value of this one should be the same as the Tag used before (see screenshot4).

Now add a Button object and place it next to the AnimatedLabel object. This button will be the scroll button. Now that you have that be sure to select the button and go to the Actions tab in the ribbon menu. There are two actions we will be setting, the Mouse Down and the Mouse Up. For the Mouse Down use Set Analog -> "Second Tag Used" -> "Value of the scroll speed" and for the Mouse Up use Set Analog -> "Second Tag Used" -> 0 (see screenshot5).

Now that those actions are setup lets go back to the AnimatedLabel and go to the General tab in the ribbon menu. In here make sure the check box next to Animated is checked. From this menu you can also change how the text scrolls. To change that change the Animation direction drop down, I have it setup as From down to up (see screenshot6).

That should make a scroll button for the text box. When you run this it should look like screenshot7.

If you have any other questions please feel free to ask.
Attachments
screenshot1.png
screenshot1.png (150.61 KiB) Viewed 32131 times
screenshot2.png
screenshot2.png (112.59 KiB) Viewed 32131 times
screenshot3.png
screenshot3.png (52.27 KiB) Viewed 32131 times
screenshot4.png
screenshot4.png (46.04 KiB) Viewed 32131 times
screenshot5.png
screenshot5.png (137.03 KiB) Viewed 32131 times
screenshot6.png
screenshot6.png (75.34 KiB) Viewed 32131 times
screenshot7.png
screenshot7.png (29 KiB) Viewed 32131 times
Best Regards,

Beijer Electronics, Inc.
Doug Harding | Applications Engineer

daoa80
Posts: 44
Joined: Fri Aug 10, 2012 8:50 am

Re: Textbox

Post by daoa80 »

This is a good way to add scroll functionality to what I'm doing. Point taken.

Next question or so you have an idea of what I'm trying to accomplish.

1. Read table in a database that resides with the project.
2. Parse data from the table.
3. Display data (Column name and row data) using Label or TextBox

I can do all the point mentioned above; the only issue that I have is:

1. If I have a the Label or TextBox, the size is going to be 1.
exe. 300x300
That means that I won't be able to re-size those control after the project
is downloaded to the display. Consequently, I need to add a scrollbar
either vertical or/and horizontal so I can read the text if it is beyond the
Label or TextBox size like in this form or textbox where I'm typen this
message. I noticed the scrollbars appeared automatically.

2. I noticed the animated label goes in a loop and that;s not the idea. When you get to the bottom you can't go around. You will have to go up, to the begining of the text.


Thanks.

Doug H.
Posts: 4
Joined: Tue Jul 29, 2014 3:08 pm
Location: Salt Lake City, UT

Re: Textbox

Post by Doug H. »

Alright I'm looking into what can be done though it may end up having to be scripted. What version of iX Developer are you using?
Best Regards,

Beijer Electronics, Inc.
Doug Harding | Applications Engineer

daoa80
Posts: 44
Joined: Fri Aug 10, 2012 8:50 am

Re: Textbox

Post by daoa80 »

Version 2.11 Build 2.11.416.0

Doug H.
Posts: 4
Joined: Tue Jul 29, 2014 3:08 pm
Location: Salt Lake City, UT

Re: Textbox

Post by Doug H. »

Quick question, you are able to do scripting correct?
Best Regards,

Beijer Electronics, Inc.
Doug Harding | Applications Engineer

daoa80
Posts: 44
Joined: Fri Aug 10, 2012 8:50 am

Re: Textbox

Post by daoa80 »

Yes. I am able to do scripting.

Post Reply