AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein GUI-Design mit VCL / FireMonkey / Common Controls Delphi ComboBox nach TabStop True/False Text markiert
Thema durchsuchen
Ansicht
Themen-Optionen

ComboBox nach TabStop True/False Text markiert

Ein Thema von Eppos · begonnen am 17. Aug 2022 · letzter Beitrag vom 17. Aug 2022
 
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.413 Beiträge
 
Delphi 12 Athens
 
#5

AW: ComboBox nach TabStop True/False Text markiert

  Alt 17. Aug 2022, 13:47
Am TabStop selber liegt es garnicht.

Irgendwas im SetWindowLong(GWL_STYLE) bringt das Control durcheinander.


Ob es jetzt an Windows oder irgendwas in der VCL liegt, konnte ich nicht entdecken.
(mit Debug-DCUs bissl durch die VCL und auf die Schnelle nichts bemerkt)


Man könnte jetzt noch mit anderen Sprachen (C++ oder so) das testen,
bzw. mal eine NonVCL-ComboBox erstellen und auch dort schauen.



Aus TComboBox.SetTabStop den relevanten Code rausgeholt und Zeilen einzeln getestet und unwichtiges auskommentiert:
Delphi-Quellcode:
{ ComboBox2.TabStop := Value; }
//PBoolean(@ComboBox2.TabStop)^ := Value;
Style := GetWindowLong(ComboBox2.Handle, GWL_STYLE) {and not WS_TABSTOP};
//if Value then Style := Style or WS_TABSTOP;
SetWindowLong(ComboBox2.Handle, GWL_STYLE, Style);
//ComboBox2.Perform(CM_TABSTOPCHANGED, 0, 0);
Delphi-Quellcode:
Style := GetWindowLong(ComboBox2.Handle, GWL_STYLE);
SetWindowLong(ComboBox2.Handle, GWL_STYLE, Style); // das hier ist Schuld

siehe
Delphi-Quellcode:
procedure TWinControl.SetTabStop(Value: Boolean);
var
  Style: NativeInt;
begin
  if FTabStop <> Value then begin
    FTabStop := Value;
    if HandleAllocated then begin
      Style := GetWindowLong(WindowHandle, GWL_STYLE) and not WS_TABSTOP;
      if Value then Style := Style or WS_TABSTOP;
      SetWindowLong(WindowHandle, GWL_STYLE, Style);
    end;
    Perform(CM_TABSTOPCHANGED, 0, 0);
  end;
end;
Ein Therapeut entspricht 1024 Gigapeut.
  Mit Zitat antworten Zitat
 


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 02:37 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz