Show some button only if a specific selection has been done on a menu

Hi,
I need to show some virtual button on my blynk app only if a specific selection has been done on a menu.

I’m trying to set up a multiple remote control for my living room where I got several device like TV;DVD;AUX and so on.

I want avoid tons of button on my display and keep UI super simple.

I need to set up a “product selector” and show only the related functions.

EX:
if TV is selected I want show on Blynk app (mobile display) only CH and Volume selector; there is no need to show to user play and stop button.

I don’t find anythink in the list of function that helps me on this.

@Ellis_Bosisio bit messy but you can change the label and widget text with setProperty etc but you can’t make widgets appear and disappear.

ok :pensive:

is there any chance to have 2 TABS menu in the same screen?
1st TAB will command main function (like REMOTE)
2nd TAB will command the right remote showing just the appropriate buttons.

Thank you in advance

@Ellis_Bosisio have you looked at Blynk’s Device Selector feature?

Imho Tabs widget is the simplest solution: each tab (TV, DVD, and so on) has its own widgets set

@Costas → device selector seems more related to hardware side.
@eugene–> unfortunatly I’m already using a TAB menu in my project.
It seems that I can have more thank 1 tab/project (maybe is a bug).

a solution could be:

1st design a button with that push a string like this:

// Send string
Blynk.virtualWrite(pin, “abc”);

this string will contain different remote names

2nd set up the full keyboard just one time…

3rd create if condition with “and” and maybe use adjustiment on button colors.

with this set up if a button isn’t usable in the specific configuration will be grey.

You shouldn’t be able to add more than 1 Tabs widget per project. Please elaborate on this.

Yes sorry I meant I can’t :flushed:

You only need one Tab Widget per project, just add more tabs to it as you need (up to max of four). Each tab then has it’s own screen that you can place widgets on.

@Ellis_Bosisio

As he said, a bit messy, but here are some examples I use to black out and “deactivate” a button/switch.

// Call this when wishing to "activate" button.
void buttonActivate() {
  ButtonFlag = 1;  // Set button active flag HIGH.
  Blynk.setProperty(V1, "color", "#0000FF");  // Set button to BLUE.
}

// Call this when wishing to "deactivate" button.
void buttonDeactivate() {
  ButtonFlag = 0;  // Set button active flag LOW.
  Blynk.setProperty(V1, "color", "#000000");  // Set button to BLACK.
}


// Call this when button pushed.
BLYNK_WRITE(V1) {
  if (ButtonFlag == 1) { // Only do stuff if button active.
    Blynk.setProperty(V1, "color", "#00FF00");  // Set button to GREEN.
    // Do Stuff here.
    Blynk.setProperty(V1, "color", "#0000FF");  // Set button back to BLUE.
  }
}

OK this sounds interesting.
it’s messy but can help me to have desiderated layout.
I’ll make a test during the weekend.

Thank you