Hello Guys.
I`m playing around with a custom security model wich also allows users to determine wich elements they want to see and where they want to see it record based.
For this I have created some tables. One of them stores all the elements in the solution with the formname, location, size, anchoring, readonly, visible, elementtype, actiontype etc.
When I go to a certain record a method runs first setting all elements to default and than set all changes (Record specific, parent specific or user specific).
Because I have used some splitpannels and my forms are tabpanel in tabpanel in tabpanel etc it is difficult setting the correct size and location if right and or bottom anchors are used
example:
GI_Width = forms.Settings.width + (application.getWindowWidth() - (forms.Settings.formname_from_settings_to_settings_screen.window_width + GI_TreeviewDeviderLocation))
When a form does not have focus (another tabpanel) elements dissapear from my screen also when a scrollbar is needed the element runs into this area. The second time I run the method it corrects this.
In listview also problems arrize.
Well now my request
Is it possible to get/set the element location and size and then let the default Servoy engine position and stretch the element correctly on the form.
Something like.
Element.getBasicLocation(number x,number y)
Element.getBasicSize(number width, number heigth)
Element.setBasicLocation(number x,number y)
Element.setBasicSize(number width, number heigth)
This way we are able to dynamicly read/set all the elements and let servoy take care of the presentation to the user wich it does perfectly.
Kind of changing the element on the form in developer.
By the way I set 280 elements with no performance issues (Location, size, readonly/enable, visible) isn`t it great.
Also the function to get and set the anchoring and get the element type (label/button, field, portal, tabpanel, bean) would be also very nice (only fields can be set to readonly otherwise enable is used)
Element.getAnchor(t,l,r,b)
Element.setAnchor(t,l,r,b)
Element.getType()
I think this way it is possible to create nice looking dynamic forms limiting the number of forms youll have to create otherwise. It even is possible to change the look/functionality of a form on the fly alowing key users to do so. This way you dont have to worry when a new release is affecting a change made by a customer in developer because they don`t need a developer for nice looking form changes.
Kind Regards.
Rene