drag a button + [shift]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

drag a button + [shift]

Smalltalkiano
Hi,

    dragging + shift on a icon of a tool bar produces undesirable effects on
a exe.

    Anybody knows how do I could prevent it?


tia

regards

Seb


Reply | Threaded
Open this post in threaded view
|

Re: drag a button + [shift]

Ian Bartholomew-4
Seb,

>     dragging + shift on a icon of a tool bar produces undesirable effects
> on a exe.
>
>     Anybody knows how do I could prevent it?

A quick browse around MSDN shows that it is the CCS_ADJUSTABLE style that
controls this so -

Go to the Toolbar>>defaultWindowStyle method and remove the "|
CCS_ADJUSTABLE" style and save the method. This stops the draggable
behaviour.

Go to Toolbar>>defaultWindowExStyle and remove the "bitOr:
TBSTYLE_EX_DRAWDDARROWS". If you don't do this then the toolbar doesn't
redraw correctly when you recreate it. I keep meaning to ask Blair about
this. I think it causes trouble because the above constant a) Doesn't appear
to exist (MSDN doesn't mention it) and b) has the same value as the EX style
WS_EX_DLGMODALFRAME

Use the ResourceBrowser to open the "Toolbar.Tool bar" resource
    - select the toolbar in the view
    - select "Mutate View" from the Modify menu
    - Select Toolbar in the List and click OK
    - Save the modified resource

Using Mutate is the easiest way I've found of reinitializing the resource so
the new style takes effect. For the default, empty Toolbar you could just
delete the existing resource and create another but for populated Toolbars
using mutate avoids having to add all the buttons back.

NB This will change the behaviour of any _new views you create with
Toolbars, _not existing ones - you will have to mutate the resource for each
of those individually.

Ian


Reply | Threaded
Open this post in threaded view
|

Re: drag a button + [shift]

Ian Bartholomew-4
> I keep meaning to ask Blair about this. I think it causes trouble because
> the above constant a) Doesn't appear to exist (MSDN doesn't mention
> it) and b) has the same value as the EX style
> WS_EX_DLGMODALFRAME

Slight correction - TBSTYLE_EX_DRAWDDARROWS does appear in MSDN (I don't
know why I missed it before) but it should be used as a ToolbarExtendedStyle
rather than as a WindowExtendedStyle.  Dolphin does use it in the correct
way elsewhere so it looks like Toolbar>>defaultWindowExStyle is a hangover
from some experimenting

Ian


Reply | Threaded
Open this post in threaded view
|

RE: drag a button + [shift]

Smalltalkiano
I'm on it  !

thank you