Filed a bug report:
<http://realsoftware.com/feedback/viewreport.php?reportid=qdctfpbs>
Description:
Win32 only: When a Toolbar is present on a window, setting the
window's height in code results in the wrong height. In the enclosed
example, the pushbutton should set the window to a height of 300, but
the window ends up with a height of 156. This is critical to solve
for 2006 R5 since being unable to save and restore window states is a
showstopper. This was run in the Mac UB IDE, both R4 and R5b1, remote
debugging to WindowsXP SP2 (on different XP clients; same thing
happens in built app).
Steps to Reproduce:
1) Create a new cross-platform toolbar (the toolbar has to have at
least one item with an icon)
2) Add the toolbar to a window and make the window resizable
3) Add a pushbutton to the same window
4) In the pushbutton's action event, write: Self.Height=300
5) Run on Windows and click the pushbutton
6) Use the debugger to pause the running debug app and check the
window's actual height
Sign on if you like. Thanks.
Brad
On Oct 20, 2006, at 12:00 PM, Brad Rhine wrote:
Hello, NUG!
As much as I'm digging having cross-platform toolbars, I think I've
just run across another issue with using on Windows. In a lot of my
apps, I store settings and prefs in a dictionary, including window
sizes. I typically use code like this:
In the Window.Open Event:
If Prefs.Dict.HasKey("StudentListWindowH") Then
Self.Height=Prefs.Dict.Value("StudentListWindowH")
End If
If Prefs.Dict.HasKey("StudentListWindowL") Then
Self.Left=Prefs.Dict.Value("StudentListWindowL")
End If
If Prefs.Dict.HasKey("StudentListWindowT") Then
Self.Top=Prefs.Dict.Value("StudentListWindowT")
End If
If Prefs.Dict.HasKey("StudentListWindowW") Then
Self.Width=Prefs.Dict.Value("StudentListWindowW")
End If
In the Window.Close Event:
Prefs.Dict.Value("StudentListWindowH")=Self.Height
Prefs.Dict.Value("StudentListWindowL")=Self.Left
Prefs.Dict.Value("StudentListWindowT")=Self.top
Prefs.Dict.Value("StudentListWindowW")=Self.Width
(Prefs is a module.)
This works great until I add a toolbar to the window. On the Mac,
it works great, but on Windows, it really screws around with the
window height. Sometimes the window will show up with practically
zero height, and other times it will show up waaaay too tall. I'll
be filing a bug report later today, but I was wondering if anything
was seeing something similar, or if anyone could offer a workaround
for saving and restoring the window settings with a toolbar present.
--
Brad Rhine
[EMAIL PROTECTED]
http://bradrhine.com
Tangelo: Web Publishing... With A Twist!
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>