April 19, 2024, 09:58:10 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Deleting Toolbar Button

Started by Bruce Peaslee, April 22, 2012, 05:25:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bruce Peaslee

I can create a working ToolBar, but I can't seem to delete any of the buttons.

I am using:

ControlCMD (d1,D1_TOOLBAR,TB_HIDEBUTTON,0)

for button zero, the first one, but nothing happens.
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

LarryMc

sendmessage(getcontrolhandle(d1,D1_TOOLBAR),TB_HIDEBUTTON,8,1)

The '8' identifies the 8th button(zero based)
The following '1' says hide it.

The ControlCMD function only works for a small predefined set of toolbar messages.
Obviously TB_HIDEBUTTON wasn't one of them.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Bruce Peaslee

I'll check it out.

Plug: I used the Toolbar Painter in the new IDE to solve the problem. Nice piece of work.
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles