- This topic has 4 replies, 2 voices, and was last updated 7 years, 5 months ago by Support.
-
AuthorPosts
-
June 2, 2017 at 11:16 am #37505HeDiBoParticipant
My project consists of a TsPagecontrol, of which the tabs are activated by PageControl.ActivePage :=
All tab sheets are filled with a frame containing a TsFrameAdapter.
Doing that, I noticed a terrible rendering problem in the Windows 10 skin.
The screen shots below are from a project being developed, so not all screens are finished.
If the program starts, this is the first screen:
[attachment=8334:RenderBug0.jpg]
(I know, it looks awful but it is under development).
When I click “Instellingen” the program makes another tab sheet active, but that one only renders partly:
[attachment=8335:RenderBug1.jpg]
This is how it should look like:
[attachment=8339:RenderBugGood.jpg]
When I go from the start page straight to the page called “Registratie”, I get this:
[attachment=8336:RenderBug2.jpg]
where in fact it should look like this:
[attachment=8337:RenderBug3.jpg]
I even managed to mingle three tab sheets into one:
[attachment=8338:RenderBug4.jpg]
That page should have looked like this:
[attachment=8340:RenderBugGood2.jpg]
You can imagine that I was shocked .
This problem exists longer, I think. It's in 12.10 and in 12.11. And I tried a version of the program from May 18 and that had the same problem.
If I look closely I can see that other skins have more or less the same problem, but they correct themselves automatically (I see the wrong rendering first immediately followed by the correct one).
Important: as soon as I activate another program, the rendering of the current tab sheet is made correct. Other tab sheets remain wrong, until I activate them and run another program again.
Once the page is correctly rendered, it seems to stay correct after that.
The tab pages are made current with the following code:
Code:procedure TWIP4MainForm.sPageControlChange(Sender: TObject);
begin
if sPageControl.ActivePage.ControlCount > 0
then sPageControl.ActivePage.Controls[0].Perform(WP_START_FRAME, 0, 0);
end;procedure TWIP4MainForm.sPageControlChanging(Sender: TObject;
var AllowChange: Boolean);
begin
if sPageControl.ActivePage.ControlCount > 0 then
AllowChange :=
( sPageControl.ActivePage.Controls[0].Perform(WP_STOP_FRAME, 0, 0) ) = 0;
end;procedure TWIP4MainForm.SelectPage(TS: TsTabSheet);
var
AllowChange: Boolean;
begin
if Application.Terminated then
Exit;
AllowChange := True;
sPageControlChanging(sPageControl, AllowChange);
if not AllowChange then Exit;
sPageControl.ActivePage := TS;
sPageControlChange(sPageControl);
end;Upon receiving the WS_START_FRAME message, the frame on the tab sheet will initialize its controls (like filling text fields with text, etc.)
All frames have this at construction time:
Code:constructor TSomeFrame.Create(AOwner: TComponent);
begin
inherited;
Self.Align := alClient;
end;The SkinManager is in a separate DataModule, which is created before the main form.
June 2, 2017 at 1:48 pm #56752HeDiBoParticipantI changed the main form to get rid of the row of speedbuttons at the bottom and make the page control show the tab labels again.
That cured the problem.
I'm not happy with that. It means that selecting a tab sheet with sPageControl.ActivePage := some_tab becomes different from selecting that tab manually with the tab label. The former may cause all sorts of problems!
Also, that makes this bug: http://www.alphaskin…?showtopic=9581 even more important to fix.
June 2, 2017 at 1:48 pm #56753SupportKeymasterHello, thank you for screenshots and code.
Can you upload the Dfm-file for this form also, please?
I will try to make a test-application based on this Dfm.
SkinManager have default options specified?
June 2, 2017 at 2:16 pm #56754HeDiBoParticipant'Support' wrote:Hello, thank you for screenshots and code.
Can you upload the Dfm-file for this form also, please?
I will try to make a test-application based on this Dfm.
SkinManager have default options specified?
Sending the DFM file will not help you much. That's almost empty. All dfm info is in the frames that make up the tab sheets.
I'll send some files by private mail to you.
June 2, 2017 at 3:00 pm #56755SupportKeymasterThank you, I will check it.
-
AuthorPosts
- You must be logged in to reply to this topic.