rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.91k stars 299 forks source link

Add/Remove References Dialog isn't wide enough. AKA "Werez mah buttunz!" #4647

Closed daFreeMan closed 5 years ago

daFreeMan commented 5 years ago

Version 2.3.1.4330 OS: Microsoft Windows NT 10.0.15063.0, x64 Host Product: Microsoft Office 2016 x64 Host Version: 16.0.4711.1000 Host Executable: MSACCESS.EXE

Loving the new Add/Remove References dialogue box. Unfortunately, the default box size isn't quite big enough to show the the "Change Priority" (?) buttons: 2018-12-18 07_37_43-microsoft visual basic for applications - roireport - form_satsummary code

If I drag it wider, they show up: 2018-12-18 07_38_44-microsoft visual basic for applications - roireport - form_satsummary code

The simple fix would be to put the order buttons to the side of the "Selected" (right hand side) box, and only enable them when a "Selected" reference is selected. That would have the added bonus of allowing me to move my ADO reference all the way to the bottom of the list (if I desired to do that) without chasing the buttons all the way down the dialogue box.

comintern commented 5 years ago

It wouldn't seem like it, but a ListView is absurd difficult to keep the column sizes in sync with a sizeable container without switching the item display container to a GridView (which only makes it merely difficult). The problem with using a GridView for this IMHO is that it is thermonuclear overkill for what it would be doing, and even then the process of keeping everything aligned at the correct column sizes is expensive as hell in terms of processing. Granted, there aren't a ton of references in the typical project (screenshot above aside - betting you'll see some grey ones soon...) but that makes it even more of an overkill container.

So, the [difficult-01-duckling] is a bit of an understatement for the above screenshot. My counter proposal is to put the buttons on the left, and instead of making them invisible, dim them if they can't be used. That would avoid the conspicuous gap that they'd otherwise create. Something more like this:

screenshot from 2018-12-18 20-40-37

Note that this would also let us use the "drill-through select" behavior of the pin buttons to make it a bit more responsive. Thoughts?

daFreeMan commented 5 years ago

Late to the party, as usual...

I would have put the "Up/Down" buttons in the gutter between the two boxen, above or below the "Left/Right" arrows. Enable them only when a "Selected" library is selected and movable (not at the top/bottom and, I presume not a locked library).

While it's not likely, if I add a library to the end of a longish list, but need it to be a higher priority, I just fully qualify all calls in code would simply select it in the left box, add it to the right box, then move the cursor to the "Up" button and click 'til I'm done. With the arrows in the box, I have to click, move the cursor, click, move the cursor, click... Doesn't seem like good UX.