FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: Overlapping widgets  (Read 7038 times)

rascalito

  • Newbie
  • *
  • Posts: 8
    • View Profile
Overlapping widgets
« on: July 23, 2020, 09:40:05 AM »

Hello!
I'm using a FT813 7-inch display. I would like to make a keyboard object with entry field.
Ideally, this would be an opaque object that would come on top of all the other objects
when I tap a value to be edited.
Is there a problem overlapping objects? I mean, writing many widgets, and then displaying
a bigger object that hides other widgets previously drawn in the same session (between command start
and display swap).

Beside this, other than hiding other widgets, I would like to first draw a very large button which covers
a bit more than the area of the keyboard itself. This would solve the problem of spaces between the
buttons.

Thanks for any hint!
R
« Last Edit: July 23, 2020, 09:42:31 AM by rascalito »
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 892
    • View Profile
Re: Overlapping widgets
« Reply #1 on: July 28, 2020, 01:51:12 PM »

Hello,

Yes, you can set the COLOR_A before widgets such as keys and it will set the alpha value to give them transparency.

Large buttons use quite a lot of Display List resources and so if your aim of the large button in the background behind the keys is just to detect if pressed between the keys, a tagged rectangle under the keys would do the same job. You can even make it invisible by setting the alpha to 0 if it is only for touch sensing purposes.

Alternatively, you can set the CLEAR_TAG before calling the CLEAR(1,1,1) at the start of the command list and this will set the tag which you get if you touch any area of the screen which is not containing a tagged object.

You can also make custom keys instead of the keys widget by using small equally sized bitmaps as bitmap cells (thereby allowing you to load many buttons on the same bitmap handle) and so could have icons or images on them.

Best Regards, FTDI Community

Logged