Help needed with .NET and Java

Update: Dave has an excellent solution to the ButtonListBar .NET control problem.

Firstly, the .NET question: does anybody know how to get this Button ListBar Control to work?

I was trying to get the.NET Button ListBar control into my VB project’s toolbox - I followed these instructions:

To use the control, add either the ButtonListBar.vb or ButtonListBar.cs file to your project. You should find the control automatically appears in the Toolbox; if not you’ll need to force the toolbox to display the
control: typically I find that double clicking on the control source file to open its designer causes this to occur.”

Unfortunately, it doesn’t appear automatically when I added ButtonListBar.vb (via “Add existing item”). So I double-clicked the source file… But it threw out this error

The class ButtonListBar can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file…

Which I don’t understand of course. Neither did it cause the ListBar control to appear in the Toolbox. I have emailed the author about this, but if anyone knows what I’m doing wrong, please let me know ASAP.

This of course leads to the question: What is the correct way to add a user control which comes in source form?

Now, for the Java question: is there an existing library/package that would allow me to calculate the median and, say, the 95th percentile of a population quickly? I searched to no avail, of course, before I ask this.

I can do this myself the hard way, but I’m really pressed for time. I’d like to reuse an existing solution if there is any.

Thanks for any leads!

5 Comments & TrackBacks (Add yours)

The paper doll icon that precedes each comment is an idea conceived by Vanessa Tan.

Paper doll icon
Stephan Segraves's Gravatar

For your .NET problem are you using the “Add File to Project”? If so when you add the file it should add the Namespace of the file at the top of your code.

What version of .NET?

Posted by: Stephan Segraves on March 8, 2004 11pm

Paper doll icon
Cheah Chu Yeow's Gravatar

I’m using Visual Studio .NET 2003.

With the help of Dave via email, I managed to get rid of the error when trying to view the file in the Designer view. That was done by moving the region containing the “event argument classes to the end of the ButtonListBar.vb”.

I can add the file now, which I did using “Add Existing Item”, Stephan. It didn’t add its namespace anywhere. I couldn’t find a “Add File to Project” link.

Anyway, the control appears in the Toolbox, but it complains when I try to use it. It complains that it needs a control that has been built.

Now I need help compiling the control into a DLL :)

Posted by: Cheah Chu Yeow on March 8, 2004 11pm

Paper doll icon
Dave's Gravatar

I e-mailed a solution to the dll problem as well, hopefully it works, it worked here.

Posted by: Dave on March 9, 2004 3am

Paper doll icon
Cheah Chu Yeow's Gravatar

Yup Dave’s solution works. Thanks man!

I’ve posted his solution in a new entry.

Posted by: Cheah Chu Yeow on March 9, 2004 3pm

Paper doll icon
ilod's Gravatar

Very good website you have here.

Posted by: ilod on July 28, 2006 7pm

You can subscribe to the RSS feed for comments on this post.

Post a comment

(required)

(required, but never displayed)


You can format your comments using XHTML. Your email address will not be displayed or used for nefarious purposes.

Only following tags are allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>