Click here to Skip to main content
15,910,234 members
Home / Discussions / C#
   

C#

 
Generalreturning a datareader Pin
_Searcher_19-May-04 0:39
_Searcher_19-May-04 0:39 
GeneralRe: returning a datareader Pin
Colin Angus Mackay19-May-04 0:47
Colin Angus Mackay19-May-04 0:47 
GeneralRe: returning a datareader Pin
Aryadip19-May-04 0:54
Aryadip19-May-04 0:54 
GeneralRe: returning a datareader Pin
_Searcher_19-May-04 4:19
_Searcher_19-May-04 4:19 
GeneralHorizontal scroll not working with OwnerDraw (List box) Pin
pushpi19-May-04 0:35
pushpi19-May-04 0:35 
GeneralRe: Horizontal scroll not working with OwnerDraw (List box) Pin
Aryadip19-May-04 0:46
Aryadip19-May-04 0:46 
GeneralRe: Horizontal scroll not working with OwnerDraw (List box) Pin
pushpi19-May-04 1:12
pushpi19-May-04 1:12 
GeneralRe: Horizontal scroll not working with OwnerDraw (List box) Pin
Aryadip19-May-04 2:18
Aryadip19-May-04 2:18 
hi,
But your code shows that the line is commented... for your ease let me point out the line with repeated "*"s...

// Handle the MeasureItem event for an owner-drawn ListBox.
private void ListBox1_MeasureItem(object sender,
MeasureItemEventArgs e)
{

// Cast the sender object back to ListBox type.
ListBox theListBox = (ListBox) sender;
// Get the string contained in each item.
string itemString = (string) theListBox.Items[e.Index];

// Split the string at the " . " character.
string[] resultStrings = itemString.Split('.');

// If the string contains more than one period, increase the
// height by ten pixels; otherwise, increase the height by
// five pixels.
if (resultStrings.Length>2)
{
e.ItemHeight += 10;

/*********** you have commented here**********************/

//theListBox.HorizontalScrollbar = true ;

/********************************************************/
}
else
{
e.ItemHeight += 5;
}
e.ItemWidth +=100000 ;

}

and if it has still not worked...

then try declaring the same when you are instantiating or rather creating the listbox...

regards,
Aryadip.

Cheers !! and have a Funky day !!

QuestionHow to check Maximize button click event of a Form or how to check whether present size of form is maximum available size. Pin
sachinkalse18-May-04 23:13
sachinkalse18-May-04 23:13 
AnswerRe: How to check Maximize button click event of a Form or how to check whether present size of form is maximum available size. Pin
Aryadip19-May-04 0:19
Aryadip19-May-04 0:19 
AnswerRe: How to check Maximize button click event of a Form or how to check whether present size of form is maximum available size. Pin
Heath Stewart19-May-04 4:20
protectorHeath Stewart19-May-04 4:20 
Generalretrieving the value of XML parent problem Pin
dhananjayav18-May-04 23:09
dhananjayav18-May-04 23:09 
GeneralRe: retrieving the value of XML parent problem Pin
Heath Stewart19-May-04 4:18
protectorHeath Stewart19-May-04 4:18 
GeneralDisplaying data from database into a checkbox list Pin
M3L18-May-04 22:47
M3L18-May-04 22:47 
GeneralRe: Displaying data from database into a checkbox list Pin
Heath Stewart19-May-04 4:13
protectorHeath Stewart19-May-04 4:13 
GeneralNetwork listener Pin
mhmoud rawas18-May-04 22:26
mhmoud rawas18-May-04 22:26 
QuestionDisposing Collection of IDisposable? Pin
Dr Herbie18-May-04 22:26
Dr Herbie18-May-04 22:26 
AnswerRe: Disposing Collection of IDisposable? Pin
Daniel Turini18-May-04 22:43
Daniel Turini18-May-04 22:43 
GeneralDesign Time Property Window Pin
acidcrush18-May-04 22:19
acidcrush18-May-04 22:19 
GeneralRe: Design Time Property Window Pin
Heath Stewart19-May-04 4:08
protectorHeath Stewart19-May-04 4:08 
Generalproblem with using VNC hooking Pin
fu018-May-04 22:03
fu018-May-04 22:03 
GeneralRe: problem with using VNC hooking Pin
Dave Kreskowiak19-May-04 3:24
mveDave Kreskowiak19-May-04 3:24 
GeneralSockets question Pin
Vladimir Georgiev18-May-04 20:47
Vladimir Georgiev18-May-04 20:47 
GeneralRe: Sockets question Pin
Roman Rodov18-May-04 21:07
Roman Rodov18-May-04 21:07 
GeneralRe: Sockets question Pin
Vladimir Georgiev19-May-04 2:44
Vladimir Georgiev19-May-04 2:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.