Subject | Re: [IBO] Re: TIB_LookupCombo and 2 monitors |
---|---|
Author | |
Post date | 2016-08-08T21:42:30Z |
Yes I too see errors in D 10.1 Berlin's compile process.
Eg. File <some file> was not found. Compile the project again and the file is found. I have have not yet asked if there are updates to 10.1.
Back to IB_GRID.pas. Looking at the calculation for LeftPos just before the call to SetWindowPos(...) none of the calculations test whether part of the dropdown LC will be off screen. Why is this of interest to me? I am reworking code in my project to ensure it presents well in multi-monitor uses. I use a delphi form's Num= self.monitor.monitorNum and screen.monitors[Num] properties to determine monitor properties of the monitor containing the centre of the form in use. I am setting windows.mesageBox positions to ensure the MessageBox appears on the same monitor as the form issuing the message. End of this side comment.
In an IBO grid, when a LC drops down and the dropdown list uses one column there is, I think I have observed, no problem. The dropdown list usually has the width of its containing grid column. The dropdown button is onscreen and PopupAlignment = puLeft makes the dropdown list onscreen.
I have some dropdown lists with up to three columns. Why? To give a user more context when selecting an item from the dropdown list. So my dropdown list width can be wider than its containing grid column. In one only monitor cases if the form and grid are to the right side of the monitor and the LC column on the right, part of the dd list is off the right edge of the only monitor. Changing the calculation of LeftPos in IB_Grid.pas is not in-scope here. A simpler way to handle this is: if the LC has several columns presenting and if the LC is to the right of the grid the use PopupAlignment = puRight.