View Issue Details

IDProjectCategoryView StatusLast Update
0005182JEDI VCL00 JVCL Componentspublic2012-06-11 17:43
ReporterLoPiTaLAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionunable to reproduce 
Product Version3.39 
Target VersionFixed in Version 
Summary0005182: TJvCaptionButton doesn't paint correctly on MDI child form.
DescriptionTJvCaptionButton doesn't paint on its place after maximizing and restoring the MDI child window. It is always painted over the close button.
Additional InformationUsing
  Delphi 2007
  JVCL 3.39
TagsNo tags attached.

Activities

2010-02-25 16:29

 

TJvCaptionButton_problem.rar (287,214 bytes)

obones

2010-03-09 11:06

administrator   ~0017273

Please try with the latest JVCL version, I'm not seeing this with the SVN content

LoPiTaL

2010-03-09 16:43

reporter   ~0017296

Hi again!
I have already updated to the last version (as I told you on isue 0005177), and I found that the behaviour is the same.
Maximize the MDI child (not the main), then restore it, and the button is drawn over the close button, and not where it should go.
May have I done something bad while installing? I am seeing "Version 3.40" on the property "AboutJVCL", so I think it is correctly updated...
Thanks you again,
LoPiTaL

LoPiTaL

2010-03-22 16:39

reporter   ~0017317

Hi again. Trying some other solutions, I have found that the button is correctly painted if the maximize / minimize method is the same as in the "Docking\VCDemo" example, this is, done manually.
If I use the maximize / minimize buttons that appears in the menu bar if the main form has its property "Menu"<>nil, then it paints over the close button.
In fact, you can modify this example this way to see the behaviour:
  - MainForm.Menu:=MainMenu1
  - In "SourceEditUnit.pas", add a TJvCaptionButton to the form (it is not necessary to modify any of its properties).
  - Execute the example. If you maximize and restore from the menu bar, then it is not correctly painted. If you maximize and restore from the buttons in the MainMenu_Toolbar, then it is correctly painted.

Strange behaviour...
LoPiTaL

LastRomantic

2010-03-31 08:17

reporter   ~0017334

Also there is another problem.
The button does paint wrong in Windows Vista with Aero theme (a few pixels higher than Border Icons)

I tried to calculate top and height button parameters.
In the end we got here so "black magic":

procedure TMyForm.FormActivate( Sender: TObject );
var
 i:Integer
begin
  i:=GetSystemMetrics(SM_CYFRAME) div 4;
  if (i mod 2) > 0
    then cbMonoView.ButtonTop := 0
    else cbMonoView.ButtonTop := i;
  cbMonoView.ButtonHeight := GetSystemMetrics(SM_CYCAPTION) - 5;
end;
Is there a better solution than this?

LastRomantic

2010-03-31 08:19

reporter   ~0017335

Sorry.
cbMonoView is TJvCaptionButton, of course.

obones

2011-06-08 15:14

administrator   ~0018671

I have just tried with the latest SVN content, compiled under DXE, run under Win7 with Aero theme and the button always appear where it is supposed to appear

LoPiTaL

2011-06-08 16:03

reporter   ~0018684

Yes, I updated too to Delphi 2010 and the problem disapeared.
Maybe a bug with D2007?

obones

2011-09-21 11:43

administrator   ~0018916

Need to test with D2007

obones

2012-02-23 09:55

administrator   ~0019489

I could not reproduce it either with D2007 and today's SVN content

Issue History

Date Modified Username Field Change
2010-02-25 16:29 LoPiTaL New Issue
2010-02-25 16:29 LoPiTaL File Added: TJvCaptionButton_problem.rar
2010-03-09 11:06 obones Note Added: 0017273
2010-03-09 11:06 obones Status new => feedback
2010-03-09 16:43 LoPiTaL Note Added: 0017296
2010-03-22 16:39 LoPiTaL Note Added: 0017317
2010-03-31 08:17 LastRomantic Note Added: 0017334
2010-03-31 08:19 LastRomantic Note Added: 0017335
2011-06-07 17:41 obones Status feedback => acknowledged
2011-06-08 15:14 obones Note Added: 0018671
2011-06-08 15:14 obones Status acknowledged => feedback
2011-06-08 16:03 LoPiTaL Note Added: 0018684
2011-09-21 11:43 obones Note Added: 0018916
2011-09-21 11:43 obones Status feedback => acknowledged
2012-02-23 09:55 obones Note Added: 0019489
2012-02-23 09:55 obones Status acknowledged => feedback
2012-06-11 17:43 obones Status feedback => resolved
2012-06-11 17:43 obones Resolution open => unable to reproduce
2012-06-11 17:43 obones Assigned To => obones