Results 1 to 40 of 4199

Thread: CommonControls (Replacement of the MS common controls)

Threaded View

  1. #11
    Addicted Member
    Join Date
    Apr 2017
    Location
    India
    Posts
    238

    Re: CommonControls (Replacement of the MS common controls)

    Dear Krool,

    It is time to say my hearty thanks,once again, for your matchless contribution to the society.

    Well, I noticed a few things while using Labels in Coolbar.


    1. If I have only label controls (either intrinsic or yours) placed on a coolbar (e.g. cbr1), then the labels' captions do not show up. Borders, backcolor, etc. as well.
    2. When I open the 'Properties' window of cbr1 and try to add the labels to the bands, the dropdown does not list the labels.
    3. If I add a command button extra to cbr1, then the labels get listed in the dropdown (of cbr1's Bands tab) but their properties (caption, border, etc.) still do not show up even if I add them to any of the bands.
    4. Moreover, when I try to execute my app, presence of the labels in cbr1 leads to an error in the following code at the line "Set .Child = .Child". So, effectively, I am not able to use label controls in Coolbars.


    Code:
    Private Sub TimerInitChilds_Timer()
    Dim Count As Long
    Count = Me.Bands.Count
    If Count > 0 Then
    Dim i As Long
    If CoolBarDesignMode = False Then
    For i = 1 To Count
    With Me.Bands(i)
    Set .Child = .Child 'Throws ERROR in this line. Run-time error '380': Invalid property value
    End With
    Next i
    Else
    Dim RBBI As REBARBANDINFO
    With RBBI
    .cbSize = LenB(RBBI)
    .fMask = RBBIM_CHILD
    For i = 0 To Count - 1
    .hWndChild = 0
    SendMessage CoolBarHandle, RB_SETBANDINFO, i, ByVal VarPtr(RBBI)
    .hWndChild = -1
    SendMessage CoolBarHandle, RB_SETBANDINFO, i, ByVal VarPtr(RBBI)
    Next i
    End With
    Call UserControl_Resize
    End If
    End If
    TimerInitChilds.Enabled = False
    End Sub
    Sorry if my above observations are wrong. Kindly let me know what mistake I am doing while adding the label controls to cbr1.

    Kind regards.
    Last edited by softv; Jul 23rd, 2021 at 11:11 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width