463 views
in GUI Development by

Hello

Assume

Class Core::Root Application -> is a main class, which represents a display of product.

vclass Application::Application Application_WithButton -> is a variant class, which represents the full product with display in it.

 

 

Whenever i do a change at the main class, it should be reflected automatically at the variant class(Actually, it is happening).

The problem is, In Main class the display starts at (x,y) = (0,0)

but in variant class, the display starts at (x,y) = (45,35)

Each time, after i do some changes at main class, I had to manually modify the variant class manually. I want to avoid this.

Please suggest.

--

Maha

1 Answer

0 votes
by

Hi Maha,

if I understood correctly, you have the appliocation class with Bounds property configured with a start position other than 0,0. I suppose, this will become problematic, since the area of the application component is usually maped 1:1 to the LCD area.

Anyway, I have not understood how you configure the start positions. You do this by setting the properties Bounds? If this is the case, the value you have specified in the variant will override the inherited value from the original class. Thus changing the value in the base class should not require the derived class to be adapted. Can you explain exactly the steps you follow?

Best regards

Paul

by

Problem I am facing:

I am at protyping phase and I am very frequently adding and removing screen elements. Original class is the actual LCD display(No touch), and the variant class is the product to simulate the Keys. LCD is kept somewhere at the middle of the product.

Each time, when I add new screen elements at the original class, I have to goto the variant class and manually change the bounds property for it.

For example: If I place a widget in Original class at (xPos,yPos) and If i wanted to see the product view(Variant Class) of it, then I've to goto variant class and then i hav to change the bounds to (xPos+xOffset, yPos+yOffset) manually. Is there an easy way to do this ?

 

by
Hello,

such automatism is not available. According to the object-oriented concept of inheritance, when you add a new widget to the original class, all derived classes and variants inherit the widget's original properties. No automatic modification is applied on them. If you want in the variant other values for some widget property, you need to override in the variant the corresponding property.

Hope it helps you.

Best regards

Paul Banach
by
Hello

I was able to do it, by making use of .MoveView(<x,y>, false);

var Core::View viewItem;

viewItem = GetViewAtIndex( index );

viewItem.MoveView(<X,Y>, false);

Thanks

Embedded Wizard Website | Privacy Policy | Imprint

...