Studying the SCI0 inventory window, it seems the item labels are DText objects. How interesting then that they act not unlike buttons.
Looking at the original LSL3 code, there's a description for DText: "A non-editable, generally non-selectable text field." Emphasis mine. And indeed, when the invDialog generates the list of DText elements representing your current inventory, it sets their state to (| csENABLED csEXIT), or (| dActive dExit) as Sierra liked to call it. You can't normally click on a text label because they don't have those state bits set. Now, DText don't do anything to draw themselves, leaving that to their super, DItem. Checking the SCI11 code, text controls are first drawn as usual, then if the control has the "selected" state and is not a field, list, or icon, it's framed. That's a match.
So that's the basic jist behind the inventory window's "buttons without borders". The exact same trickery applies to SCI11's "get items" debug cheat window.
Now, when a Dialog's doit is called, it'll return the value property of the selected control, which in this case is either a pointer to an inventory item or 0 (the "OK" button's implied default value). And since invDialog is itself a subclass of Dialog, it can provide its own doit, which doesn't actually close the window until "OK" is chosen.
What I'd do for the sake of having a "general use" window in this sort of style, is to copy the whole definition for invD/invDialog, give it a data property, and instead of having it iterate gInv/gInventory, you have it iterate whatever List or Set that data property points to. Remove the "OK" button and the whole repeat block -- just memorize what the super's doit returned, dispose of yourself, and return what you memorized.