Gui.Gettext function

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Gui.Gettext function

Re: Gui.Gettext function

by BeanieBots » Tue Jan 21, 2025 10:15 am

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Dec 09, 2024 5:17 pm ... is there a possibility to tell a subroutine who called it, and what to call when it closes?
Like an addressof (subroutinelabel) function, and a gosub address?
...
I think what you are describing is what I know as a "state engine".
The caller assigns a value to a 'state' variable. Hence, the sub knows who called it.
Also, (somebody correct me if I have this wrong) subroutines can be called by using a string to hold the name. An array of strings could enable calling subroutines by variable value. A similar function could also be structured within a select/case function.
Maybe not exactly what you are after but a potential workaround?

Re: Gui.Gettext function

by karlkloss » Tue Dec 10, 2024 10:59 am

Nice, thank you.
No, this info is not avalable but could be implemented
You could simply cut off the text when it is longer than the textarea can display, and then the user can just call len(GUI.GetText(textfieldhandle)).

Re: Gui.Gettext function

by cicciocb » Tue Dec 10, 2024 10:48 am

I've just updated the version 1.70.5 that contains the following fixes :

Code: [Local Link Removed for Guests]

Version 1.70.5
- Fixex onUrlMessage event
TFT
    - Implemented gui.textarea (same syntax as the VGAGUI.TEXTAREA)
    - Fixed the repetitive event on button when the text changes inside
    - Implemented GUI.GetText (same as VGAGUI.GETTEXT)
    - Implemented GUI.Visible obj, visible (0=hidden, 1=shown)
[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Tue Dec 10, 2024 8:13 am Oh, and one question: Is there a way to find out how many characters fit into the textarea, resp. how many it has been able to display?
No, this info is not avalable but could be implemented

Re: Gui.Gettext function

by karlkloss » Tue Dec 10, 2024 8:13 am

Oh, and one question: Is there a way to find out how many characters fit into the textarea, resp. how many it has been able to display?

Re: Gui.Gettext function

by karlkloss » Tue Dec 10, 2024 7:52 am

Thanks, you're the best. That'll make things much easier for me.

I'm always switching between several boards, but at the moment I'm using an ESP32-2432S028, so standard ESP32 without PSRAM.

Re: Gui.Gettext function

by cicciocb » Mon Dec 09, 2024 6:35 pm

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Dec 09, 2024 6:13 pm You could write us an onscreen keyboard :D
What is the module that you are using ? ESP32 classic or ESP32-S3?

edit:
I implemented the tft.gettext and the tft.textarea functions ... if you want try just let me know what is the version that you are using so that I can export the right .bin

Re: Gui.Gettext function

by cicciocb » Mon Dec 09, 2024 6:22 pm

You can eventually use an external BLE keyboard or USB keyboard if you are using the ESP32-S3

Re: Gui.Gettext function

by cicciocb » Mon Dec 09, 2024 6:16 pm

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Dec 09, 2024 6:13 pm You could write us an onscreen keyboard :D
Is already into the TODO list

Re: Gui.Gettext function

by karlkloss » Mon Dec 09, 2024 6:13 pm

You could write us an onscreen keyboard :D

Re: Gui.Gettext function

by cicciocb » Mon Dec 09, 2024 6:10 pm

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Dec 09, 2024 5:53 pm Well, building a dynamic GUI in standard BASIC seems like a very dumb idea.

Maybe I will switch to Micropython and LVGL.
No, it is probably not a dumb idea ... it is probably just a questions of methods.

Top