1 2 /* This code will be useful whenever you have more text in a 3 listbox than the listbox can display, by setting he vertical 4 scrollbar to horizontal. */ 5 //--------------------------------------------------------------------------- 6 7 #include <vcl.h> 8 #pragma hdrstop 9 10 #include "Unit1.h" 11 //--------------------------------------------------------------------------- 12 #pragma package(smart_init) 13 #pragma resource "*.dfm" 14 TForm1 *Form1; 15 //--------------------------------------------------------------------------- 16 __fastcall TForm1::TForm1(TComponent* Owner) 17 : TForm(Owner) 18 { 19 } 20 //--------------------------------------------------------------------------- 21 22 void __fastcall TForm1::FormCreate(TObject *Sender) 23 { 24 SendMessage(ListBox1->Handle, LB_SETHORIZONTALEXTENT, 1000, Longint(0)); 25 } 26 //--------------------------------------------------------------------------- 27