Closed AObuchow closed 4 years ago
Sorry for the broken gifs I attached. Will fix them shortly.
Sorry for the broken gifs I attached. Will fix them shortly.
The gifs should be visible now.
...I solved my issue!
Turns out to get the behavior I wanted, I had to use a BorderLayout
(and set preffered sizes) instead of a GridLayout
for the ActionListBoxes.
Hey, I'm trying to figure out how to set the max-width of an ActionListBox (but have its length not be limited).
setPrefferedSize
almost accomplishes what I want, but it doesn't let the component grow past the preferredSize.Currently, I'm using a GridLayout with multiple action list boxes. Each action list box is populated with files for a given directory. The length of the filenames is variable, so the action list box will grow in width to accommodate a longer filename. I'd like to set a limit to how much each action list box can grow in width.
Here's a gif of the current behavior (I'm basically building a Norton Commander clone):![Current behavior Current behavior](https://lh3.googleusercontent.com/qMcdNp5oCeIPaKrGq963ufwC257D8DZ7GyvQ4PDgx6AfFJBzDVpPWfwB0iWS0DQ7zURGmYyP1I_VN5Lg3kvO8OffqPPnH_AkHtUXHXEwlfDefK7b_oRQNBcXrJDXWM0VDj_BXsgvFWCnf_qvJgTj9o9ZmwOTTa4XcTpdh77gMr10gnIxVeASxVStQeoaFcYP7tphnC-cynwzrXN-x6RaNRcwT-nC4LwOR6bAqr0CO-tWkPryhzBbygZFW01EFRNCNe0tnZ52p83KIKvvcDP2QMcN3c8EhnplyETgKPhtmwMbRnF6dqHYcOC3AodxjQ6uvH_0W4RpA2hdwKalv7nzOpHvYQSxRGzYdzAB5DEyE_ZE_j60WymHxBHPuI-HP0itucN_Z_qHiEy2mlTYdhM1IFk2HAiClsXNZXV1Rclm_Ujbh4-0T4R1iVGf4u3QdZEQi1Tiw7XlhTJvEnyygXSU57TObfyZ00ZxEPO2bC19mBXADtx4HmHgleOV26O78NW0MZDy0ifenpT25dzvyD4hpR_Vx338JCL9DwOTJG-kr4Lftfk4LhV1aQhzXcjytt4_Tgvmu5AbO2PtgbZHZUPf0h8pfqEyKpLJi83Jm90zcdmQ5bpezqlfMDLwKXuzpCVKAcyRLRKVQlMmF5TBtB9L_cLdZyExooel0jwaNDoT8ZytS3FwDqeXt7D40AL1Qtov4Q2owmKqsaqlamJOR4gQc3qRfkR5Ld6lo5S73Uzv9_lyeWrhTw3X8Q=w1440-h525-no?authuser=0)
The desired behavior would be that the width sizing remains constant, as seen in this gif of Ranger:![Desired behavior Desired behavior](https://lh3.googleusercontent.com/BVOFlisal-O9wxlvSExtM_Whg3g0aZZfXtdVfMTBkCq7JyC-vnmAR0XARwUlZv_ilFSw9XhhxdfSr4jglfHnFAVF4kiNy9mhS0mAXP-m710jmxylEd__NNBWryx_pnCFY1e6zatgOIEiuVWcoFZpHBz2gFerdcTyh7D9gSo9RvDO2LTn1DX-GNF5X4uw2TSunsHhZFaX1wdiYurfXo1hKbEHPF2uFhZqey-m7ijmavknIE6u2szmk3zqFF1RSSq3t1paAyHiYD6_QPFFXuBDW6N5Jo9u1o0mjbIqVB2ZqBwx8wIcTZ4mhHRs07RnmKjn731GzHYRh8S3X928a3MRAfff6ymjJ2XzKLVK9WrH4FAOesxlmW2fnF_ykyuBlR2VSARZPLNnjW78lnIKDaJBv_XyovWm6wDblSNL-qfxdgjOgJuhAmIo68duh6BqUMNQM4jOU-fkEFxQYborxk10MPpjkRItRQmGcNALcg3sT1HPJXpETWa_krPsiXcwQyoS_4Y1tEkv6uHFJBaF7wn1OOplGhkDnGW7lwcwdGtxV_BHFBMbUNLH0eu29RGXmo7onNTAg62swn54GFU8bWLsgMgT2ztIUd5hnX3F85Y_v0RXzLl9AMTYE1tvaOeSw-OQEiyKO_lapZa27nviJJYJncckaYrz24FStMPavOBf2srtO1JkTE8f35uTajfM9TucJKSIxMELDfwQwzdR_Sr2Ywq_PCIVriJw9Bd372sRqJ96AYc4F31F2w=w655-h722-no?authuser=0)
Is there a way to accomplish these using layouts/Lanterna API? Maybe I shouldn't be using GridLayout?
Thanks :) & sorry for the very specific question.