Set enabled property in code for TAB control

BokkBokk Member Posts: 138
We have enabled/disabled many controls on a sales form which is a bit tedious. We tried to disable the entire tab control so the header could not be modified. Ideally we would like to do it by page to be more flexible where needed. (* CurrForm.TabControl.ENABLED := FALSE; does not work like it does for every other control.)

We haven't had any luck in coming up with syntax that will compile to do this. Is anyone aware of a way of doing this, or that knows that is simply can not be done.

Thanks!
SGM

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Nope, does not work.

    You can place the tabcontrol in a dummy subform. :?
  • DenSterDenSter Member Posts: 8,307
    Tab controls don't have the ENABLED property exposed to C/AL code, like other types of controls.

    You're going to have to write the tedious code yourself, I'd probably put that in a function so you can see the code no matter where you are in the form. I am not a fan of subforms, there are always funky refresh issues with those, and the sales order already has a subform. Writing that function may be tedious, but it's the easiest code you'll ever write, and it's done in just a few minutes.
  • BokkBokk Member Posts: 138
    Thanks for the information. At least I know what can and cannot be done.
    SGM
Sign In or Register to comment.