StrataFrame Forum

BBS component missing

http://forum.strataframe.net/Topic22833.aspx

By Sierra Fourwinds - 4/20/2009

This is probably another "beginner" issue.  I've created a business binding data source and it is missing from the component listing in VS where I can drag it onto a form.  In the 1st project I worked on, I went through the tutorial and was able to create BBS objects that appeared in the component listing in the Toolbox automatically.  I am not sure why in project #2, my BBS objects will not appear there anymore. Thanks for the help.
By Greg McGuffey - 4/20/2009

Sometimes you have to add an attribute to get it to show up. Not sure why this is only needed sometimes. I brain kinda fried, but I think it is the ToolboxItem attribute, in the System.ComponentModel namespace:



' VB

<ToolboxItem(GetType(MyBBS)> _

Public Class MyBBS

  Inherits Microfour.StrataFrame.Business.BusinessBindingSource

End Class





// C#

[ToolboxItem(typeof(MyBBS))]

public class MyBBS: Microfour.StrataFrame.Business.BusinessBindingSource

{

}

By Sierra Fourwinds - 4/20/2009

Thanks Greg for the reply.  My brain is just "overstuffed" at the moment with trying to learn SF without a class yet!

The code that worked for me was:

<ToolboxItem(True)> _

It is in the tutorial!  Oh the challenges of the simple things.

By Trent L. Taylor - 4/21/2009

It is in the tutorial!  Oh the challenges of the simple things.

No.  It is just more of a .NET thing.  This is intentionally left off as many times you do not want these showing up in the toolbox.  As your application grows, you may even want to turn off the auto-populating of the toolbox as this can become frustrating waiting on Visual Studio to load this.  We actually turn this off an manually create tabs of items that we want to drop on forms.  Also, we actually update the designer file manually to add BOs, etc. just to save time.  This is not something I am recommending, just another perspective that may help down the road.

By Greg McGuffey - 4/21/2009

When I typed out the examples, my brain was protesting that the type wasn't what I'd used before, but I couldn't remember and that was on the .net MSDN site....glad you figured it out even with my incorrect examples!
By Sierra Fourwinds - 4/21/2009

Thanks Trent for the "bigger picture" on where this fits in.  I too work in the medical area, and have applications with lots and lots of tables.  You are so right about not wanting the Toolbox to get tooo long.

Sierra