cancel
Showing results for 
Search instead for 
Did you mean: 

Resizable custom control

Former Member
0 Kudos

Hello!
I hope for help.
I need to create an application for the time tracking system. The application must create task blocks that must be clickable.


I made my own controls, which draw html div blocks.

               ... <br>               oRm.write(" style=\"width: " + oControl.getWidth()
                                + "; height: " + oControl.getHeight()
                                + "; background-color: " + oControl.getBackground()
                                + "; margin: " + oControl.getMargin()
                                + "\"");

                oRm.writeControlData(oControl);
                oRm.write(">");
                
                oRm.write('<div>' + oControl.getText() +'</div>');
                
                $(oControl.getContent()).each(function(){
                    oRm.renderControl(this);
                });
                
                oRm.write('</div>') <br>                ...

But how to make that the blocks can be resized and dragged?

Maybe you know the solution? I did not find them.
Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member365727
Active Contributor
0 Kudos

for resizable add hotspot at the bottom right of the screen, so that user can click and resize the window. But I believe better alternative is to use sap.ui.core.ResizeHandler

Why don't you use sap.m.PlanningCalendar and extend the element for events resize and drag

Former Member
0 Kudos

Srikanth KV,

thank you for the answer. I think that PlanningCalendar is not very "flexible" for the task. Maybe I could not find a good example?.. I'll look at the ResizeHandler.

Previously also I've connected

    $.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-core');
    $.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-widget');
    $.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-mouse');
    $.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-draggable');
    $.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-sortable');

but how I can make my custom controls is resizable and draggable?..
Thanks!