Unit HListBox

-------------------------------------------------------------------------------------} { An horizontally scrolling listbox component for Delphi32. } { Copyright 1996, Fulvio Senore. All Rights Reserved. } { This component can be freely used and distributed in commercial and private } { environments, provided this notice is not modified in any way. } { -------------------------------------------------------------------------------------} { Feel free to contact me if you have any questions, comments or suggestions at } { fsenore@avigliana.alpcom.it (Fulvio Senore) } { -------------------------------------------------------------------------------------} { Date last modified: 28 Dec 1996 } { -------------------------------------------------------------------------------------} { -------------------------------------------------------------------------------------} { Description: This unit implements a listbox with horizontal } { scrolling capabilities } { -------------------------------------------------------------------------------------} { The idea is simple: we must inform the listbox about the maximum length } { of the stored strings. Before adding every string we compute its } { length in pixel and, if the length is greater then the current maximum, } { we send a LB_SETHORIZONTALEXTENT message to set the new maximum length. } { -------------------------------------------------------------------------------------} { This is a simple example: it can only correctly add new strings or clear } { the listbox. I really don't need more, but you can extend it. } { For example, to correctly delete a line you need to know if you just } { deleted the longest line: in this case send a LB_SETHORIZONTALEXTENT } { message to set the maximum length of the remaining lines. } { -------------------------------------------------------------------------------------} { Added methods to the listbox: } { procedure AddString( s: string ); } { procedure ClearList( s: string ); } { } { Use the first to add strings to the listbox and the second to clear } { the listbox. } { } { I realize that it would be better to use the standard Items.Add and } { Items.Clear methods, but I don't know how to override them (they are } { methods of a property of the listbox). If anybody knows how to do it } { I will be glad to receive an explanation. } { -------------------------------------------------------------------------------------

Classes

THListBox -

Functions

Register - Published declarations

clears the listbox

Types

Constants

Variables


Functions


procedure Register;

Published declarations

clears the listbox


Types


Constants


Variables