Yeah, the GUIs in the KotOR games (and Jade Empire too) are very hardcoded. There are GUI files (which are GFF), which contain information about the layout, but they're more used as guidelines.
The game executable knows about the layout of all the GUIs, and instantiates the classes for the elements. It then looks into the GUI files and only picks certain fields out of them, and applies them to the elements. Which fields are read from the GUI files also changes depending on the GUI and the elements, so it's very likely that the sizes of certain elements are hardcoded.
Finding that out was actually pretty disappointing. It's just so...hacky.