Subject Re: [IBO] Re: TIB_LookupCombo and 2 monitors
Author Geoff Worboys
Re: [IBO] Re: TIB_LookupCombo and 2 monitors I'm not sure what to suggest about the inconsistency you were seeing - except perhaps a build error in Delphi.  I've noticed some anomalies in Delphi's build system, even 10.1.  For example it will sometimes complain about not being able to inline some functions during a compile, but will report no problems when you do a full build.  As a result, one of the first things I do when I hit a problem is to be sure I do a full build - which, thankfully, in Delphi doesn't really take much longer anyway.

I see what you mean about the monitor indexes.  I think the moral here is to ignore how monitors are indexed and depend on their Left/Width Top/Height properties when determining where the monitor is sitting (otherwise your program may change behaviour depending on monitor cabling).

Anyway, I hope it stays fixed for you.

Geoff Worboys
Telesis Computing Pty Ltd

russell@... [IBObjects] wrote:

Thanks Geoff for your comments.

Yes I mean there is a misalignment when the TIB_LookupCombo drops down.
In Win 10 the two monitors are "extended". The 1st has index 0 in screen.monitors[index] and is on my right.. The 2nd has index 1 and is on my left.

I was looking in IB_GRID.PAS today but gave up too early. I found SetWindowPos(.. ,LeftPos, ...). My problem should be in the calculation of LeftPos which occurs in a case statement on FPopupAlignment just above this call. In the cases there is no case for puLeft... Oh, I see it is the default case, above the case statement. So I put IB_Grid in the debugger and stepped through the code. It works as expected and I do not see the problem I had.The TIB_LookupCombo (LC)  with DropDownAlign = daaLeft is OK. (It seems the property PopupAlignment is the same as property DropDownAlign for LC).

In Win 10, IBO, Delphi 10.1 Berlin I added a function and a procedure to IB_Grid.pas and rebuilt it. Did I make a mistake that cased the LC misalign error?  I don't see any error in IB_GRID.PAS which is unchanged from my rebuild.

I rebuilt my exe and the mis-align feature has gone. A copy of my exe from yesterday has the mis-align feature. So my report may have been a result of some mis-adventure by me. I am puzzled.