1. #1
    Sencha User f.sauter's Avatar
    Join Date
    Jul 2009
    Location
    Germany
    Posts
    32
    Vote Rating
    0
    f.sauter is on a distinguished road

      0  

    Question Portal Rows

    Portal Rows


    Hey all,

    I am looking for a way to set the max number of rows (column items) in a Portal. I can't access the array list columns in Portal...

    Anybody know a possibility?

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    I would extend Portal and override onDragMove. If the target column already has to many items, do nothing.

    Should be quite simple to do. Only check if the targetcolumn is the startcolumn, than you always need to allow it.

  3. #3
    Sencha User f.sauter's Avatar
    Join Date
    Jul 2009
    Location
    Germany
    Posts
    32
    Vote Rating
    0
    f.sauter is on a distinguished road

      0  

    Default


    Hi Sven, thanks for the quick reply.

    That's right, but not applicable!? "startColumns" is private and has no getter, getColumn(int x) is also private.
    The DragEvent, offers me only the coordinates. So how would you access the columns in a class that extends the portal?

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    use JSNI to access it.
    You can also listen to the ValidateDrop event of Portal and cancel it, if the target is not allowed

  5. #5
    Sencha User f.sauter's Avatar
    Join Date
    Jul 2009
    Location
    Germany
    Posts
    32
    Vote Rating
    0
    f.sauter is on a distinguished road

      0  

    Default


    Ok, that's a possibility. Perhaps you can set the visibility of the relevant members in the near future to protected, just to keep it simple.

Thread Participants: 1

Tags for this Thread