Options

Enable MenuItem

KarenKaren 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

  • Options
    randrewsrandrews 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
  • Options
    KarenKaren 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?
  • Options
    randrewsrandrews Member Posts: 135
    If you set then := TRUE then they will be enabled.

    I don't know - what dependences you want to do
  • Options
    KarenKaren Member Posts: 79
    I mistake from me.
    I want to DISABLE the menuitem.
  • Options
    Luc_VanDyckLuc_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)
Sign In or Register to comment.