« Back to University of Duisburg-Essen

Dynamic Height Dimension

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dynamic Height Dimension
graphrep
Answer
5/16/18 11:00 AM
Hello,

I'm currently developing a GRAPHREP implementation.
I will attach the current version of my attempt as FileUpload.

My goal was to enable the implementation to be responsive when resizing.
So all measures are relative and not absolute.
At the very end of the script I would like to set the height of the entity to the necessary size.
Unfortunately there is no reaction in the rendering of the entity when the height variable is changed.

Do you guys know a Workaround for my "Problem". Do I have a mistake?

Best Regards
Oliver Just
Attachments: indicator.graphrep (10.3k)

RE: Dynamic Height Dimension
graphrep aval resize
Answer
5/18/18 8:04 AM as a reply to Oliver Just.
Dear Oliver,
Could you be more specific about what you actually want to implement. Maybe you could provide some screenshots of your idea and why it is not working (or the .abl file if possible) so that it is easier for others to understand and test your implementation.

RE: Dynamic Height Dimension
Answer
5/18/18 10:33 PM as a reply to Mateusz Dziedzic.
Dear Mateusz,

I'm sorry if my description was a bit unclear and complicated. I'll try to explain it more understandable.
I'm trying to develop something like this:

The image seen above is the actual development state. My problem is the huge margin between the "assumptions" and the bottom border of the box. The Contents in the Box like "formula" or "purpose" can vary and dont need to be existent for every entity. That means I cant specify how much height the box needs. My idea was to "correct" the height of the entity after every content was added.
The original height is set in line 20. The variable "dim_firstContent" then keeps the updated height. When every content is added dim_firstContent should contain the perfect height for the entity.
In line 215 I then tried to set the "perfect height" to the original height variable.

So basicly I tried to do something like this:


But as it seems the change of the original height variable doesnt have a effect for the rendering of the entity. At least not after it was first specified

Best Regards
Oliver

RE: Dynamic Height Dimension
graphrep aval resize
Answer
5/25/18 8:08 AM as a reply to Oliver Just.
Dear Oliver,

thank you for the detailed description. This helped to better understand your issue. In order to make the object height changeable depending on the attributes you can do the following:

1) Draw the implementation header (line 54-70) after the last SET dim_height statement in line 215. As a consequence, the object will be drawn with the height defined at the end, which depends on the attributes.

2) Use the min() and not the max() function in line 215.

3) When you create new attributes they are usually empty by default. Depending on the type this can be "" e.g. for Strings and 0 e.g. for integers. This means that you do not have to set a default value “empty”, but you can just check in the if-statement if the attributes are empty. E.g. if the attribute "purpose" is a String in your case then the if-statement in line 164 would look the following: IF(var_purpose != "") {}. As I do not have your library, I tried to recreate the depicted object and made the assumption that all the attributes you used are Strings. Thus, for the script I attached all the if-statements are adjusted to String attributes. Depending on the type of the attribute you will have to change the if-statements.
Attachment

Attachments: Object.JPG (23.7k), indicator.leo (10.9k)

RE: Dynamic Height Dimension
Answer
5/25/18 11:30 PM as a reply to Mateusz Dziedzic.
Dear Mateusz,

thanks for your reply. It helped alot! Your first hint worked very well. I should have thought about the Idea myself. The Solution is so simple emoticon.

To 2) Yeah, sorry about that. It originally was min. I experimented a bit with the implementation. It seems I have forgotten to change it back.
To 3) Thanks for the advice. I will change it as soon as possible.

Best Regards
Oliver