Menu

#1 pwColor

open
nobody
None
5
2004-09-02
2004-09-02
Anonymous
No

Hi Matt,

at first: really good control.

But i found something strange in the Parts with the
custom icon.

I created a property with iType pwColor and want the
property to have an additional state like enabled /
disabled, so I implemented the eventsinks
1. Propertydoubleclick with a toggle-mechanism to
enable and disable the property
2. Propertychanged to do the valuechange part

Now when I double-click this property, at first the color-
control opens and "after" confirming or canceling, the
control is given to the doubleclick-event, even when the
property has disabled-state.

I tried to "lock" the property to (old mechanism) with no
other reaction.

I think it should only react on the customicon on the
right side.

Any suggestions?

Snowman
aka Güner Tas
Mail: dusfor72@yahoo.de

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Hi,
    found the solutuion to change this behaviour.

    In ctlEditColor -> TakeKeys Keycode-resolving routine you
    have to comment the Call to "cmdEllipsis_Click".
    From then the iTypes Color and ColorEx only starts-up on
    click on the small button.
    Perhaps you can use the Locked-property to control this
    behaviour.
    Code:
    Public Sub TakeKey(...)
    ...
    If KeyCode = vbLeftButton And (Shift And
    vbMouseDoubleClickMask) > 0 Then
    'it was double clicked
    ' cmdEllipsis_Click <---- Comment
    ...
    End Sub

     
  • Nobody/Anonymous

    Logged In: NO

    Found something else:

    When ColorDialog (ColorEx only) is opened for a property with
    is near to bottom of the screen, the dialogs OK, Cancel... -
    Buttons are displayed behind for ex. the TaskBar or perhaps
    outside the screen-range.
    Following Code may Help here:
    Private Sub cmdEllipsis_Click(...
    If m_objProperty.iType
    ...
    ElseIf m_objProperty.iType = pwColorEx Then
    With frmColorDialog
    ...
    GetScreenPos ContainerHwnd, Left, Top
    Left = (Left + Extender.Left) * Screen.TwipsPerPixelX
    Top = (Top + Extender.Top) * Screen.TwipsPerPixelY

    If Top + .Height > Screen.Height - 32 *
    Screen.TwipsPerPixelY Then
    Top = Screen.Height - .Height - 32 *
    Screen.TwipsPerPixelY
    ...

    Snowman
    aka Gner Tas
    Mail: dusfor72@yahoo.de

     

Log in to post a comment.