I confess from the outset that I am struggling with learning to program - approaching 70 - too old perhaps!
However, I have managed to connect a 3.5" TFT shield to an Arduino Mega, get the touchscreen working and create a display with a number of 'menu' items and adjacent rectangles where I need the user to either select fixed values or actually in one case enter a numeric value. Looking at Visual C# I see that this can be done with something called a ComboBox.
I had the idea that using the touchscreen I could select an input position i.e. the rectangle adjacent to the menu description and I could create Up / Down buttons to display values from an array - is this feasible ?
I attach a photo if the display to clarify.
I am trying to avoid the use of any physical buttons or rotary encoders.
As I say I am somewhat lost and looking for what is feasible - any pointers much appreciated.
A library of general GUI components can become very big, nothing a small Arduino can handle. See open source widgetsets.
A combobox consists of a static text field and a drop down button and list. The list must be filled with items. One item may be selected for the display content in the static field. A command makes the list drop down (or up). Then an entry can be highlighted and finally selected, whereupon the list collapses again. Optionally the static field can be editable, and an entered or edited text can become another item of the combobox list.
A menu is somewhat similar to a combobox, with special rules for selecting items and submenus. There exists a very long thread about menus in the forum.
I also remember the IBM SAA standard for menus, which I implemented on the first laptops in the late 80s.
This Thread about Awind may be of interest. I have not used it myself.
The graphics that appear on a PC require an enormous amount of code. I'm surprised they work as quickly as they do - but that is what all the huge increases in CPU power have been used for.
Robin2:
The graphics that appear on a PC require an enormous amount of code. I'm surprised they work as quickly as they do - but that is what all the huge increases in CPU power have been used for.
The code can be big, but that's mostly for handling all window messages under all circumstances, and with dispensable effects like fading in and out. I wrote some Windows controls myself, starting with Win3.1, and the code did neither use much memory nor runtime. What me puzzles most is how fast text is rendered with vector fonts (TrueType...).
All Windows screen output relies on the GDI library. On an Arduino the output relies on the basic functions supplied by the display controller and library.
A TFT display requires a stored image and refresh, what's beyond most Arduino capabilities. That's why a TFT display typically comes as kind of a graphics card, with its own memory, controller and all required components.
DrDiettrich:
A TFT display requires a stored image and refresh, what's beyond most Arduino capabilities. That's why a TFT display typically comes as kind of a graphics card, with its own memory, controller and all required components.