Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi PageControl comctl32 Problem (https://www.delphipraxis.net/40399-pagecontrol-comctl32-problem.html)

punker76 15. Feb 2005 09:32


PageControl comctl32 Problem
 
Tag auch...

Habe ein riesiges Problem mit dem Pagecontrol. (Delphi 5 mit Update 1 und 2, Windoof 2000 mit allen Servicepacks)
(bei Windoof XP passiert das nicht)

Problem:

Habe ein PageControl erzeugt:
Delphi-Quellcode:
  Page      := TPageControl. Create (self);
  Page. Align   := alClient;
  Page. TabStop   := FALSE;
  Page. MultiLine:= TRUE;
  Page. Parent   := self;
Nun werden mehrer Sheets darauf angelegt:
Delphi-Quellcode:
  MySheet         := TTabSheet. MyCreate (Page);
  MySheet. Parent      := Page;
  MySheet. PageControl      := Page;
  MySheet. Align      := alClient;
bei dieser Zeile bekomme ich folgenden Fehler:
Delphi-Quellcode:
  MySheet. PageControl      := Page;
Zitat:

Im Projekt ... ist eine Exception der Klasse EAccessViolation aufgetreten. Meldung: 'Zugriffsverletzung bei Adresse ... in Modul 'comctl32.dll'. Lesen von Adresse ...'. usw.

Call stack:
:71756AA0 [comctl32.dll]
:71756B25 [comctl32.dll]
:71714867 [comctl32.dll]
:71714911 [comctl32.dll]
:7171364D [comctl32.dll]
:77E01EF0 [user32.dll]
:77E03D1E [user32.dll]
:77E03D9A [user32.dll]
:0043699B [....exe] Controls.TWinControl.DefaultHandler
:004364C3 [....exe] Controls.TWinControl.MainWndProc
:00448716 [....exe] Forms.StdWndProc
:77E01EF0 [user32.dll]
:77E03523 [user32.dll]
:77E06015 [user32.dll]
:0045CC4C [....exe] Comctrls.TCustomTabControl.GetDisplayRect
:004357F9 [....exe] Controls.TWinControl.AlignControl
:00435853 [....exe] Controls.TWinControl.Realign
:004364C3 [....exe] Controls.TWinControl.MainWndProc
:00448716 [....exe] Forms.StdWndProc
:77E01EF0 [user32.dll]
:77E03523 [user32.dll]
:77E06015 [user32.dll]
:0045D15A [....exe] Comctrls.TCustomTabControl.TabsChanged
:00412E1E [....exe] Classes.TStrings.InsertObject
:0045DFC1 [....exe] Comctrls.TPageControl.InsertTab
:0045D8B3 [....exe] Comctrls.TTabSheet.SetTabShowing

wenn ich das hier mache bekomme ich den Fehler nicht:
Delphi-Quellcode:
  Page. MultiLine:= FALSE;
Ich brauche dringend Hilfe.

shmia 15. Feb 2005 11:06

Re: PageControl comctl32 Problem
 
Zitat:

Zitat von punker76
Nun werden mehrer Sheets darauf angelegt:
Delphi-Quellcode:
  MySheet         := TTabSheet. MyCreate (Page);
  MySheet. Parent      := Page;
  MySheet. PageControl      := Page;
  MySheet. Align      := alClient;

Also mach's mal so:
Delphi-Quellcode:
  MySheet         := TTabSheet.Create(self);  // owner ist das Formular
//  MySheet.Parent      := Page;  // Finger weg von Parent !!!
  MySheet.PageControl   := Page;
  MySheet.Align      := alClient;

punker76 15. Feb 2005 11:39

Re: PageControl comctl32 Problem
 
Leider das gleiche Problem

aber trotzdem danke

berens 25. Sep 2006 11:49

Re: PageControl comctl32 Problem
 
Ich hab das lustige Problem: auf meinem einen PC klappt es (Win Xp Pro), auf dem Anderen klappt es nicht (Win 2000). Vielleicht hängt es damit (Betriebssystem) zusammen... punker76 konnstest du das Problem damals lösen? (Ist ja schon lange her...)

berens 25. Sep 2006 12:44

Re: PageControl comctl32 Problem
 
Windowsbenutzer können mit dem Wort "Problemlösung" weniger anfangen als mit dem Begriff "Workaround". :D

Also ich hab das so gelöst:

1) PageControl erzeugen & komplett vorbereiten
2) PageControl.Multiline := false
3) Alle Tabs erzeugen
4) Am Ende der Create-Routine: PageControl.Multiline := true

Muetze1 25. Sep 2006 13:19

Re: PageControl comctl32 Problem
 
Zitat:

Zitat von punker76
Delphi 5 mit Update 1 und 2

Eine kleine Zwischenfrage, da ich auch noch mit Delphi 5 arbeite: Welches Update 2? ich kenne nur das Update Pack 1 kein weiteres...


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:41 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz