No announcement yet.

How to display a text field, highlight it but not hide, then update the text

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to display a text field, highlight it but not hide, then update the text

    Hi all,

    I've got a gen4-uLCD-24DT that I'd like to use in a portable device that will allow the user to select a field on the screen and then change the contents in that field with an external encoder interfaced to another microcontroller.

    I've done some of the tutorials and have some very pretty and fancy graphics going fine. I've used the Genie and some ViSi and have had some good success with the display and the IDE, so I'm very pleased to continue to develop with it. However, I've got a pretty basic requirement and I can't seem to find a nice way to accomplish what i'd like to do.

    All I would like to to have a simple text or string field, no graphics, just a displayed string. With the touchscreen, I'd like to be able to select this text field and have it highlight but still be able to see the text. And then, while it's highlighted, the text within the field should be able to be changed. Within Genie, I've looked at the widgets and string objects, but I can't quite find some widget that encompasses what I'd like to achieve.

    Can anyone suggest some way to accomplish this either with some single "smart" button or combination of widgets, preferably within Genie, but perhaps there are some ViSi code samples somewhere that someone knows about that shows this similar action I've described?

    Thanks for the help,
    Have a good one!


  • #2

    Welcome to the forum!

    It would be easy in ViSi and you can achive this by utilizing the graphics function, with the text function because as you have mentioned you need to highlight the text and then, change the text field.

    For the meantime, I will try create a sample project that is related to your concern and I will post it here as soon as possible.

    Best regards,


    • #3
      Hi Kayven,

      Thanks for the feedback and help with generating some sample code. These displays are already quite nice to use with all the possibilities available with the IDE. This silly little need in my project though I figured would probably need to be done with some manual code. I was already digging into some possible ways to accomplish it, so I'll be very gracious if you could get me pointed int he right direction with some simple sample.

      Thanks again!
      Have a nice week,



      • #4
        Hi Dan,

        Sorry for the delayed response.

        To help you, I have attached the ViSi Project that is related to your concern and you may modify the code, if necessary because it used for demonstration only.

        This project utilized Graphics functions and Text and String functions to demonstrate your concern and it's a good start for you.

        Also, I have attached a simple video to see how it works.

        If you have questions, please don't hesitate to ask here.

        Hope it helps.

        Best regards,
        Attached Files


        • #5
          Hi Kayven,

          Wow, thanks so much for the great example! This is just what I was looking for. The software already developed with the widgets do so many eye-candy great effects, but all I needed was this simple little thing for a part of my project. And this is certainly a big part of the solution.

          Have a good one.



          • #6

            You're welcome! willing to help you Dan.

            Thank you for waiting.

            We're glad to know that we have helped you.
            Wish more success to your project.

            If you have technical concerns, please don't hesitate to ask here.

            Have a nice day!

            Best regards,
            Last edited by kayven@4d; 4th December 2018, 05:31 PM.