Jump to content

Recommended Posts

Posted

Please help me with the following. In my code I have a Tunitreeview as in the figure attached

I need that the blue button that you see in the right side of the selected node / subnode is positioned  at the same “top” dimension of the selected subnode

In VCL this can be done using TreeView.SelectedNode.Bounds.Y (for Y position) as in this post https://stackoverflow.com/questions/13068419/grab-the-location-of-selected-node-of-treeview

My problem is that I could not find  a Unigui property corresponding to  “Bounds.X” or  “Bounds.Y”

Could suggest me a way of doing this ?

Top.png

Posted

Hi Sherzod. The idea is interesting but  I do not know how could I implement. Is there something like this in the demos ?

The reason for the need of putting  the button - to call the attention for the clicked subnode - is that i I will include a text in the button (like a Hint)

Is there something like  the "bounds.X" in Unigui ?

P.S:  Is there any demo with something like draging a  component from a position to other, using the mouse ? or how to write the coordinates of the position of a point in the screen?

Posted
9 minutes ago, SergioFeitoza said:

The idea is interesting but  I do not know how could I implement. Is there something like this in the demos ?

The reason for the need of putting  the button - to call the attention for the clicked subnode - is that i I will include a text in the button (like a Hint)

Is there something like  the "bounds.X" in Unigui ?

P.S:  Is there any demo with something like draging a  component from a position to other, using the mouse ? or how to write the coordinates of the position of a point in the screen?

Hi,

For example, without considering scrolling:

UniTreeView.ClientEvents.ExtEvents -> 

function select(sender, record, index, eOpts)
{
    var grid=this.ownerGrid;
    var gridY=grid.getY();
    var elem=grid.getEl().select('table[data-recordindex="'+ record.id +'"]').elements[0];
    if (elem) {
        MainForm.UniButton3.setPosition(
          150,
          Ext.get(elem).getY()-gridY+5
        )
    }
}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...