Enable MenuItem

Karen
Karen Member Posts: 79
I've 2 menuitems on my menubutton. Is it possible to enable one of them depending on the value of a field

Comments

  • randrews
    randrews Member Posts: 135
    For example:
    One menuitem have source expr bool1
    Another bool2

    On first menuotem triger OnPush:

    bool1 := not bool1;
    bool2 := bool1;

    This is dependences
  • Karen
    Karen Member Posts: 79
    Does I've to give them a start value e.g. true

    Then they'll be set enabled or what'll happen?
  • randrews
    randrews Member Posts: 135
    If you set then := TRUE then they will be enabled.

    I don't know - what dependences you want to do
  • Karen
    Karen Member Posts: 79
    I mistake from me.
    I want to DISABLE the menuitem.
  • Luc_VanDyck
    Luc_VanDyck Member, Moderator, Administrator Posts: 3,633
    You can't enable or disable menu-items. Instead, you need to create 2 menu-buttons with a different set of menu-items. Then you can hide one menu-button, and make the other visible.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)