AGB  ·  Datenschutz  ·  Impressum  







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

TButton align to left

Ein Thema von mr_fahrrad · begonnen am 17. Jan 2007 · letzter Beitrag vom 17. Jan 2007
Antwort Antwort
marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#1

Re: TButton align to left

  Alt 17. Jan 2007, 17:39
Hi Lukas,

Zitat von DGL-luke:
... On the other Hand, you should be able to tell the WinAPI to align the text... but I don't know how.
it is a matter of style:

Delphi-Quellcode:
procedure TDemoForm.ButtonClick(Sender: TObject);
var
  dwStyle: LongWord;
begin
  with Sender as TButton do
  begin
    dwStyle := GetWindowLong(Handle, GWL_STYLE);
    dwStyle := dwStyle and not BS_CENTER or BS_LEFT;
    SetWindowLong(Handle, GWL_STYLE, dwStyle);
    Invalidate;
  end;
end;
Regards
  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 14:55 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 by Thomas Breitkreuz