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 CategoryButtons-Fehler bei GetCategoryAt (https://www.delphipraxis.net/70888-categorybuttons-fehler-bei-getcategoryat.html)

titus 6. Jun 2006 13:15


CategoryButtons-Fehler bei GetCategoryAt
 
Hi ich habe bei Delphi 2005 mal CategoryButtons ausprobiert, und will jetzt bei einem OnClick o.ä. herausfinden welche Kategorie ich geklickt habe.
Anhand: "CategoryButtons1.GetCategoryAt(X, Y).Caption" klappt das bei OnMouseDown schon, aber wenn ich jetzt nicht auf eine Kategorie klicke dann gibt's einen Exception-Fehler:
Zitat:

Erste Zufalls-Exception bei $7C81EB33. Exception-Klasse EAccessViolation mit Meldung 'Zugriffsverletzung bei Adresse 0046318B in Modul 'Project1.exe'. Lesen von Adresse 0000000C'. Prozess Project1.exe (2708)
Wie kann ich das verhindern?

mfG

sakura 6. Jun 2006 13:17

Re: CategoryButtons-Fehler bei GetCategoryAt
 
versuche mal
Delphi-Quellcode:
if CategoryButtons1.GetCategoryAt(X, Y) <> nil then
  CategoryButtons1.GetCategoryAt(X, Y).Caption ...
...:cat:...

titus 6. Jun 2006 13:20

Re: CategoryButtons-Fehler bei GetCategoryAt
 
Oh Mann vielen Dank sakura :thumb: :cat:

Das kommt davon wenn man nur aus der Übung kommt :wall:


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:06 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