Skip to main content
GFeen.1
Explorer
November 17, 2022
Question

In Touchgfx designs how to expose a protected attribute to a view class from a parent class.

  • November 17, 2022
  • 1 reply
  • 627 views

I have a SlideManu object in my ViewBase. I would like to modify the stateChangeButton attribute to allow shading from the View class object. This is a protected attribute in the SlideMenu class but there should be some way for me to have access to the parent protected attribute via inheritance in my View class.

Right now I just changed the attribute from protected to public so I can modify it but am looking for a more elegant solution.

This topic has been closed for replies.

1 reply

MM..1
Super User
November 17, 2022

protected is C++ design, no TGFX. Elegant dont exist, only extend class with public method for access protected value inside.