AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

TComboBoxEx will keine Items

Ein Thema von Neutral General · begonnen am 12. Jun 2008 · letzter Beitrag vom 12. Jun 2008
Antwort Antwort
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#1

TComboBoxEx will keine Items

  Alt 12. Jun 2008, 16:13
Hi,

Also so langsam versteh ichs nicht. Habe auch hier in der DP gesucht. Ich erzeuge eine ComboBoxEx zur Laufzeit so:

Delphi-Quellcode:
cbChooseElement := TComboBoxEx.Create(Self);
with cbChooseElement do
begin
  Parent := ValueListEditor1;
  Left := ValueListEditor1.CellRect(1,3).Left;
  Top := ValueListEditor1.CellRect(1,4).Top;
  Width := ValueListEditor1.CellRect(1,4).Right - ValueListEditor1.CellRect(1,4).Left;
  Anchors := [akLeft,akRight,akTop];
  Font.Name := 'SimSun';
  Style := csExDropDownList;
end;
Jetzt habe ich versucht Items hinzuzufügen. Probierte Varianten:

Delphi-Quellcode:
// Methode 1
var ExItem: TComboExItem;
ExItem := cbChooseElement.ItemsEx.Add;
Exitem.Caption := 'Test';
// Methode 2 (bzw 1b)
with cbChooseElement.ItemsEx.Add do
  Caption := 'Test';
// Methode 3
cbChooseElement.Items.Add('Test');
// Methode 4
cbChooseElement.ItemsEx.AddItem('Test',-1,-1,-1,0,nil);
Es funktioniert alles nichts. Zur Laufzeit passiert nichts wenn ich auf den "Aufklapppfeil" klicke...

Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#2

Re: TComboBoxEx will keine Items

  Alt 12. Jun 2008, 16:17
Ich muss mich korrigieren:

Es liegt scheinbar an dem ValueListEditor. Die ComboBox ist in der untersten Zeile und das aufgeklappte Menü wird einfach nicht angezeigt bzw man sieht es nicht -.-

EDIT: Was aber nicht heißt das die Frage damit abgehakt ist.. Wieso wird da nichts angezeigt? Wenn ich ein Panel oder so als Parent angebe, dann geht es.....
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:15 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