You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently applications made with the SpTBX will show menus as right aligned to their parent button on touchscreen pcs. This is due to the GetSystemMetrics(SM_MENUDROPALIGNMENT) call in TB2Items.pas. Touchscreen PCs return a non-zero value for this to indicate right alignment (supposedly this default is because most using a touch screen are right handed.) On the surface this would appear to be the correct thing to do, but no other applications seem to adhere to this which makes SpTBX (or TB2 really) applications stand out. It seems this metric should only be used for popup menus and not drop down ones (or at least that appears to be the convention.) This is specifically an issue in TB2Items.pas and not in SpTBX code. This change would have to be part of the TBX patch.
The text was updated successfully, but these errors were encountered:
[Update: For some reason the insert code option isn't formatting correctly for me (I must be doing it wrong.) Basically remove the "if GetSystemMetrics(SM_MENUDROPALIGNMENT) = 0 then " condition and replace it with "X := ParentItemRect.Left" This is at line 1844 in my version of TB2Item.pas.]
In TB2Item.pas change the following:
if GetSystemMetrics(SM_MENUDROPALIGNMENT) = 0 then X := ParentItemRect.Left else X := ParentItemRect.Right - W;
to: X := ParentItemRect.Left;
Currently applications made with the SpTBX will show menus as right aligned to their parent button on touchscreen pcs. This is due to the GetSystemMetrics(SM_MENUDROPALIGNMENT) call in TB2Items.pas. Touchscreen PCs return a non-zero value for this to indicate right alignment (supposedly this default is because most using a touch screen are right handed.) On the surface this would appear to be the correct thing to do, but no other applications seem to adhere to this which makes SpTBX (or TB2 really) applications stand out. It seems this metric should only be used for popup menus and not drop down ones (or at least that appears to be the convention.) This is specifically an issue in TB2Items.pas and not in SpTBX code. This change would have to be part of the TBX patch.
The text was updated successfully, but these errors were encountered: