Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toolbar-Addin

Status
Not open for further replies.

Bouke

Mechanical
Jan 13, 2004
107
I was wondering if someone could send me the script for a simple add-in including a new toolbar.
 
Replies continue below

Recommended for you

Do a search here or go to the
Maybe they can help.

Regards,

Scott Baugh, CSWP [borg2]
CSWP.jpg

faq731-376
 
Bouke:

Your recent requests have gotten me curious about finally learning to do this. I'll let you know as soon as I figure it out.

Regards,
Tick

P.S. did you get the BitWright addin from me this morning?

[bat]"Great ideas need landing gear as well as wings."--C. D. Jackson [bat]
 
I am told that there is a template of code on the SW website for doing add-ins with toolbars. Apparently it is not real hard. The thing that takes the tricks is macros from your own custom toolsbars. JH will enlighten you, Tick.

I was - and he did. So at least I didn't get coal.....
OK, OK, It's a reference to my holiday sig. "Be naughty - Save Santa a trip..."
 
TheTick:
Yeah, I've gotten your file with the vb-template yesterday afternoon. At the moment I'm waiting until my new workstation is installed so I haven't had the chance to look at it. But as soon as I make some progress I'll let u know.Grtz,

Bouke
 
Bouke:

I've cracked the "toolbar" code. Not too difficult, once you get it.

To start, here is an article that helped it all make sense w.r.t. putting bitmaps into VB addins:
In the SW API help, the "resource ID numbers" are the numbers in the resource file described in this article.

Toolbars are made from bitmaps. Each button is a section of the bitmap (see the API help for bitmap dimensions). i.e. for a small toolbar, each button is 16 pixels wide, so a 2-button toolbar would be 32 x 15 pixels. A large 2-button toolbar would be 44 wide x 22 high.

You need to design large and small toolbars. They are used when options are toggled between large and small icons (under customize in the toolbar menu).

SW does all the dividing and indexing. On the toolbar, the buttons are separated "by the numbers", i.e. button(0) = pixels columns 1-16, button(1)=pixel columns 17-32, etc. on a small toolbar.

[bat]"Great ideas need landing gear as well as wings."--C. D. Jackson [bat]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor