View Issue Details

IDProjectCategoryView StatusLast Update
0000305JEDI VCL00 JVCL Componentspublic2003-01-05 03:52
ReporterPeterPanAssigned Toremkobonte 
PrioritynoneSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version2.00 
Target VersionFixed in Version 
Summary0000305: JvBrowseFolder: Property Position does not work as expected
DescriptionIf Options+[odNewDialogStyle] then
When the dialog was enlarged at runtime:
The next time calling the dialog the Position property does not take into consideration that the dialog was enlarged so it centers the dialog thinking it has the same old small size as before: This places the dialog partly outside of the screen.
So it should calculate the position according to its enlarged size!
Additional InformationDelphi 6 Pro
TagsNo tags attached.

Activities

PeterPan

2002-09-18 05:25

reporter   ~0000512

The behavior can be repeated by compiling the example project:
JVCLexamplesJvBrowseFolder

user72

2002-09-18 09:52

  ~0000516

This is a bug (feature?) of Windows since requesting the dialogs size using the hWnd passed into lfnBrowseProc always returns the same WindowRect regardless of if the dialog has been resized or not.

PeterPan

2002-09-18 10:09

reporter   ~0000517

Last edited: 2002-09-18 10:10

Couldn't JvBrowseFolder workaround this Windows bug and manipulate its position to display it in the center of the screen when Position = poDesktopCenter/poScreenCenter, regardless of the dialog size? This would be very helpful!

edited on: 09-18 10:10

user72

2002-09-18 10:15

  ~0000520

I don't see how to accomplish this since the windows size is reported incorrectly by Windows so there is no (correct) rect to calculate the dialogs new position with.

user72

2002-11-03 11:48

  ~0000846

I haven't found any work-around for the fact that Windows always reports the original window rect even if the user has resized the dialog. If someone comes up with a fix, please reopen this report

remkobonte

2002-11-04 16:29

developer   ~0000859

I could fix it by hooking the dialog (as is done in Dialogs.pas) and then wait for the WM_SIZE message that restores the dialog size.

The BFFM_INITIALIZED notifier is send before the WM_SIZE message, thus at that point the dialog has it's default (small) size.

I must clean up the code a bit <g>, and will post it to CVS.

remkobonte

2002-11-05 04:38

developer   ~0000862

Fixed in v.1.8

Issue History

Date Modified Username Field Change