@Altar, the TStatusBar
component, draw the text using the SB_SETTEXT
Windows message, this is limited to draw 127 characters in WinXP.
lParam
Pointer to a null-terminated string that specifies the text to set.
If wParam is SBT_OWNERDRAW, this
parameter represents 32 bits of data.
The parent window must interpret the
data and draw the text when it
receives the WM_DRAWITEM message. In
Windows XP and earlier, the text for
each part is limited to 127
characters. This limitation has been
removed in Windows Vista.
As workaround you can draw the text of the statusbar yourself using the OnDrawPanel
event.
see this sample wich draw a 200 char text in the second panel of an TStatusBar
, don't forget set the property Style
of the panel to psOwnerDraw
procedure TForm1.StatusBar1DrawPanel(StatusBar: TStatusBar;
Panel: TStatusPanel; const Rect: TRect);
var
MyLongText: string;
i : Integer;
begin
//fill an string with 200 chars
MyLongText:= StringOfChar('-', 199)+'X';
If Panel = StatusBar1.Panels[1] Then
With StatusBar1.Canvas Do
TextOut(Rect.left, Rect.top + 2, MyLongText) ;
End;