Page 84 of 94 FirstFirst ... 347481828384858687 ... LastLast
Results 3,321 to 3,360 of 3726

Thread: CommonControls (Replacement of the MS common controls)

  1. #3321

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by TomasEss View Post
    Hi
    My project has used VBCCR11.OCX successfully :-) for a long time. Now I thought I would upgrade to 17.
    My DTPicker controls now no longer have the ShowCalendar method. Is this intentional? I have not found anything about it in this thread.
    Am I supposed to be able to programmatically show it some other way?
    It must be replaced by the .DroppedDown property (get/let).

  2. #3322
    Addicted Member
    Join Date
    Jul 2016
    Posts
    230

    Re: CommonControls (Replacement of the MS common controls)

    [deleted, obsolete]
    Last edited by OldClock; Jan 13th, 2022 at 01:25 PM.

  3. #3323
    Addicted Member
    Join Date
    Jul 2016
    Posts
    230

    Re: CommonControls (Replacement of the MS common controls)

    [deleted, obsolete]
    Last edited by OldClock; Jan 13th, 2022 at 01:25 PM.

  4. #3324
    Fanatic Member
    Join Date
    Oct 2013
    Posts
    783

    Re: CommonControls (Replacement of the MS common controls)

    Krool
    please could you tell why labelws and CommandButtonWs are showing Arabic language like this:
    Name:  8.png
Views: 1312
Size:  2.7 KB
    thanks

  5. #3325
    Hyperactive Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    445

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by samer22 View Post
    please could you tell why labelws and CommandButtonWs are showing Arabic language like this:
    I cant reproduce this problem here using Window 7 with VBCCR1.7:

    Name:  Screenshot - 16.01.2022 , 08_29_27.png
Views: 1224
Size:  5.7 KB

    All controls use the standard font "MS Sans Serif".

    MAybe your problem has something to do with your windows unicode settings for non-unicode programs.
    From my experience i can tell you that this windows setting can screw up the unicode display of vb apps.

  6. #3326
    Fanatic Member
    Join Date
    Oct 2013
    Posts
    783

    Re: CommonControls (Replacement of the MS common controls)

    thanks Mith for your interest
    Could you try format "Arab Egypt " and location "Egypt" in regional settings.
    I'm using Window 7 with VBCCR1.7 too

  7. #3327

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    It's recommended to use the better Microsoft Sans Serif font instead of MS Sans Serif.

  8. #3328
    Fanatic Member
    Join Date
    Oct 2013
    Posts
    783

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    It's recommended to use the better Microsoft Sans Serif font instead of MS Sans Serif.
    thanks but still no luck
    Same issue with VbFlexgrid

  9. #3329
    Hyperactive Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    445

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by samer22 View Post
    Could you try format "Arab Egypt " and location "Egypt" in regional settings.
    I work with a german Windows version. You should try another format and location because i dont have any problems here

  10. #3330
    Lively Member
    Join Date
    Oct 2016
    Posts
    108

    Re: CommonControls (Replacement of the MS common controls)

    how does the CommandButtonW.ImageList work with Picture DisabledPicture and DownPicture?

    do i need a separate ImageList for each CommandButtonW/Picture-type

    also i noticed that the MaskColor/UseMaskColor don't work when using picture without ImageList
    Last edited by Semke; Jan 20th, 2022 at 07:52 PM.

  11. #3331

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    how does the CommandButtonW.ImageList work with Picture DisabledPicture and DownPicture?

    do i need a separate ImageList for each CommandButtonW/Picture-type

    also i noticed that the MaskColor/UseMaskColor don't work when using picture without ImageList
    MaskColor is only applicable for Style = 1 Graphical.
    Same with DownPicture and DisabledPicture.

    For Style = 0 Normal you can either use Picture or ImageList.
    Code:
    ' The image list should contain either a single image to be used for all states or
    ' individual images for each state. The following states are defined as following:
        ' PBS_NORMAL = 1
        ' PBS_HOT = 2
        ' PBS_PRESSED = 3
        ' PBS_DISABLED = 4
        ' PBS_DEFAULTED = 5
        ' PBS_STYLUSHOT = 6

  12. #3332
    Addicted Member
    Join Date
    Sep 2008
    Posts
    141

    Re: CommonControls (Replacement of the MS common controls)

    Hey Krool - I swear I saw somewhere a discussion on adding the ability for png files but I cant find it. Can you point me in the right direction?

    Edited - I think I found it. It was a convo between you and Trick. I guess it still isn't supported.
    Last edited by brandoncampbell; Jan 24th, 2022 at 11:40 AM.

  13. #3333
    New Member
    Join Date
    Sep 2019
    Posts
    10

    Re: CommonControls (Replacement of the MS common controls)

    Hello,
    I'm using the VBCCR16.OCX and I want to upgrade to VBCCR17.OCX but the VisualStyles.bas of the VBCCR17 doesn't include the SetupVisualStyles function or the InitVisualStyles.
    With the VBCCR16, I had on the top of each form "SetupVisualStyles(me)", isn't this necessary anymore?

    Thanks
    Last edited by PauloFranc; Jan 24th, 2022 at 07:32 AM. Reason: Typo

  14. #3334

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by PauloFranc View Post
    Hello,
    I'm using the VBCCR16.OCX and I want to upgrade to VBCCR17.OCX but the VisualStyles.bas of the VBCCR17 doesn't include the SetupVisualStyles function or the InitVisualStyles.
    With the VBCCR16, I had on the top of each form "SetupVisualStyles(me)", isn't this necessary anymore?

    Thanks
    You shall take VisualStyles.bas from the demo in post #1 of this thread.

  15. #3335
    New Member
    Join Date
    Sep 2019
    Posts
    10

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    You shall take VisualStyles.bas from the demo in post #1 of this thread.
    Thanks for the reply and thanks a lot for you work

  16. #3336
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,995

    Re: CommonControls (Replacement of the MS common controls)

    Hello Krool, I'm using the latest compiled version of the ocx (VBCCR17.OCX), and I'm seeing some issues regarding the CheckBoxW:

    1) I find no way to disable the focus rect.
    I'm using Windows 11 with visual styles enabled (I guess Windows 10 must be the same) and the original VB CheckBox does not show the focus rect when visual styles are enabled.

    2) The property "Custom" that is supposed to display the property pages seems to just change the Value property.

    3) The property Transparent does not work at design time, but that is probably by design.

    PS: I didn't go to check the control's source code.

  17. #3337

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Eduardo- View Post
    Hello Krool, I'm using the latest compiled version of the ocx (VBCCR17.OCX), and I'm seeing some issues regarding the CheckBoxW:

    1) I find no way to disable the focus rect.
    I'm using Windows 11 with visual styles enabled (I guess Windows 10 must be the same) and the original VB CheckBox does not show the focus rect when visual styles are enabled.

    2) The property "Custom" that is supposed to display the property pages seems to just change the Value property.

    3) The property Transparent does not work at design time, but that is probably by design.

    PS: I didn't go to check the control's source code.
    Hi Eduardo,

    1) When an app is themed it has no focus rect but it will show focus rects once you use the tab key once on a window. However, this does not work in VB6. That's why the focus rect are forced in the CheckBoxW control via WM_UPDATEUISTATE. Also the VisualStyles.bas uses WM_UPDATEUISTATE on the SetupVisualStyles method for the whole form.
    If you have another approach in mind please let me know or discuss it.

    2) The Value property is the default property. The CheckBoxW has no property page, that's why the "Custom" is falling back to the Value property.

    3) Yes that's ignored at design time. The property description also tells this.

  18. #3338
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,995

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Hi Eduardo,

    1) When an app is themed it has no focus rect but it will show focus rects once you use the tab key once on a window. However, this does not work in VB6. That's why the focus rect are forced in the CheckBoxW control via WM_UPDATEUISTATE. Also the VisualStyles.bas uses WM_UPDATEUISTATE on the SetupVisualStyles method for the whole form.
    If you have another approach in mind please let me know or discuss it.
    I would have to study what you are saying.
    I just wanted to put some CheckBoxes with no caption, and I got this:

    Name:  ChW.png
Views: 992
Size:  358 Bytes

    For now I solved it by making the CheckBoxes narrower enough.

    Quote Originally Posted by Krool View Post
    2) The Value property is the default property. The CheckBoxW has no property page, that's why the "Custom" is falling back to the Value property.
    When an UserControl has no property page, the "Custom" property does not appear at the property page.
    I checked and the CheckBoxW has defined three property pages:

    StandardFont
    StandardColor
    StandardPicture

    The problem seems to be the call:

    Code:
    Call SetVTableHandling(Me, VTableInterfacePerPropertyBrowsing)
    At UserControl_Initialize.
    I think one solution might be to call it at UserControl_InitProperties and UserControl_ReadProperties but only when Ambient.UserMode is False.

    Quote Originally Posted by Krool View Post
    3) Yes that's ignored at design time. The property description also tells this.
    OK.

    Thanks

  19. #3339

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Eduardo- View Post
    When an UserControl has no property page, the "Custom" property does not appear at the property page.
    I checked and the CheckBoxW has defined three property pages:

    StandardFont
    StandardColor
    StandardPicture

    The problem seems to be the call:

    Code:
    Call SetVTableHandling(Me, VTableInterfacePerPropertyBrowsing)
    At UserControl_Initialize.
    I think one solution might be to call it at UserControl_InitProperties and UserControl_ReadProperties but only when Ambient.UserMode is False.
    I found out the reason. The (Custom) item raises IPerPropertyBrowsingVB::GetPredefinedStrings with an DispID of 0.
    But since the Value property is the default property it also has a DispID of 0... (const DISPID_VALUE; 0)

    So, it's unfortunate but I think it can be only fixed by using an Enum (As Long) instead of having the property As Integer currently.
    But that would break VBCCR17 compatibility. So it's unlikely to be changed. And it's anyway just a minor glitch as there is no real property page behind anyway.

  20. #3340
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,995

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    I found out the reason. The (Custom) item raises IPerPropertyBrowsingVB::GetPredefinedStrings with an DispID of 0.
    But since the Value property is the default property it also has a DispID of 0... (const DISPID_VALUE; 0)

    So, it's unfortunate but I think it can be only fixed by using an Enum (As Long) instead of having the property As Integer currently.
    But that would break VBCCR17 compatibility. So it's unlikely to be changed. And it's anyway just a minor glitch as there is no real property page behind anyway.
    IDK what that call does, I mean Call SetVTableHandling(Me, VTableInterfacePerPropertyBrowsing)
    What is the purpose?

  21. #3341

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Eduardo- View Post
    IDK what that call does, I mean Call SetVTableHandling(Me, VTableInterfacePerPropertyBrowsing)
    What is the purpose?
    For example to list all ImageLists available etc. in a property

  22. #3342
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,995

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    For example to list all ImageLists available etc. in a property
    Ah, OK. Then my suggestion of calling it only at runtime made no sense.

  23. #3343
    Fanatic Member
    Join Date
    Jan 2016
    Posts
    753

    Re: CommonControls (Replacement of the MS common controls)

    Does anyone know how to set listview ColumnHeaders width?
    Code:
    ListView1.ColumnHeaders(1).Width = 200
    this code is throwing error

  24. #3344
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: CommonControls (Replacement of the MS common controls)

    What's the error number & message?

  25. #3345
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: CommonControls (Replacement of the MS common controls)

    I tried this and it worked as expected without error:

    Code:
    Option Explicit
    
    Private Sub Form_Click()
       Me.ListView1.ColumnHeaders(1).Width = 10000
    End Sub
    
    Private Sub Form_Load()
       Me.ListView1.ColumnHeaders.Add , , "A"
       Me.ListView1.ColumnHeaders.Add , , "B"
       Me.ListView1.ColumnHeaders.Add , , "C"
       
       Me.ListView1.View = LvwViewReport
    End Sub

  26. #3346
    Fanatic Member
    Join Date
    Jan 2016
    Posts
    753

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by jpbro View Post
    What's the error number & message?
    incorrect argument
    Are you using Krool's listview?
    Anyway i figured out how to do that
    Code:
    ListView1.ColumnHeaders.Add , , "Name", 2000, LvwColumnHeaderAlignmentLeft
    ListView1.ColumnHeaders.Add , , "Symbol", 1200, LvwColumnHeaderAlignmentCenter
    thank you

  27. #3347
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Mustaphi View Post
    Are you using Krool's listview?
    Yes, I tried it with v1.7 of the OCX version of Krool's controls and there was no problem. Maybe you are using a different version?

  28. #3348
    New Member
    Join Date
    Sep 2019
    Posts
    10

    Re: CommonControls (Replacement of the MS common controls)

    Hi,
    I have the sub main call the main form of the application, an MDI frm, but it doesn't even show the form giving "Run-time error 440: Automation error"
    My problem is that this only happens on some PCs, one of them has Windows 7 and I found out that reducing the colour depth it stopped giving this problem. But I am now trying to run it on a Windows Server 2003 and can't get it to work.

    Does anyone have any ideas about what can be happening?


    Thanks

  29. #3349
    New Member
    Join Date
    Sep 2019
    Posts
    10

    Re: CommonControls (Replacement of the MS common controls)

    Found it... I have a toolbar linked to imagelists with the icons I need. The last two icons had a colour depth bigger than the others and older PCs couldn't cope with that.
    Since the automation error was being shown in a window with VBCCR17 in the title, I never thought that could be the problem.

  30. #3350
    New Member
    Join Date
    Feb 2022
    Posts
    3

    Re: CommonControls (Replacement of the MS common controls)

    Hello Krool, thanks making and maintaining these controls! I have two questions/issues; apologies if these have been covered.

    ComboBoxW - is there a reason that the Text property isn't the default?

    MonthView - the latest version is better than the 1.5 version I was using previously, but when setting VisualStyles = False, the runtime size is still not quite the same size as the design-time size. Testing at normal DPI, font = Arial Regular 10.

    Thanks!
    Dan

  31. #3351
    New Member
    Join Date
    Feb 2022
    Posts
    3

    Re: CommonControls (Replacement of the MS common controls)

    One more:

    MonthView - DateDblClick

  32. #3352

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by hausman View Post
    ComboBoxW - is there a reason that the Text property isn't the default?

    MonthView - the latest version is better than the 1.5 version I was using previously, but when setting VisualStyles = False, the runtime size is still not quite the same size as the design-time size. Testing at normal DPI, font = Arial Regular 10.
    ComboBoxW - That's a bug! The VB.ComboBox has a hidden [_Default] property that redirects to the Text property. The VB.Label has the same logic and the LabelW control considered that but unfortunately not for the ComboBox...
    Will look to fix that, hopefully possible for VBCCR17 without breaking.

    MonthView - maybe the IDE is not manifest and links to comctl. 5.8x and the compiled executable has a manifest and is linked to comctl. 6.x. (even if both are not themed [VisualStyles = False] the controls are different)
    What you mean with DateDblClick ? Please more context on that one.

  33. #3353

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    Included the GetTextRange function in the RichTextBox control.

    Included [_Default] property in ComboBoxW/FontCombo/VirtualCombo/ImageCombo.
    The MS ImageCombo doesn't have a default property, but I think it is of no harm to make the .Text property as the default member there as well.

    The OCX VBCCR17 was also updated. The internal type lib version is now 1.2.

    Code:
    Object={7020C36F-09FC-41FE-B822-CDE6FBB321EB}#1.2#0; VBCCR17.OCX
    Last edited by Krool; Feb 18th, 2022 at 07:07 AM.

  34. #3354
    New Member
    Join Date
    Feb 2022
    Posts
    3

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    ComboBoxW - That's a bug! The VB.ComboBox has a hidden [_Default] property that redirects to the Text property. The VB.Label has the same logic and the LabelW control considered that but unfortunately not for the ComboBox...
    Will look to fix that, hopefully possible for VBCCR17 without breaking.
    FYI, I had changed the Attribute Text.VB_UserMemId = 0 to accomplish this. Not sure which method is best.

    Quote Originally Posted by Krool View Post
    MonthView - maybe the IDE is not manifest and links to comctl. 5.8x and the compiled executable has a manifest and is linked to comctl. 6.x. (even if both are not themed [VisualStyles = False] the controls are different)
    Sorry, yes, you are correct. The EXE is running with a manifest, while the IDE is not. I think I remember seeing an article about putting a manifest on the IDE EXE... I'll look into that.

    Quote Originally Posted by Krool View Post
    What you mean with DateDblClick ? Please more context on that one.
    DateDblClick is an event in the stock MonthView control in Common Controls 2. Private Sub MonthView1_DateDblClick(ByVal DateDblClicked As Date). It comes in handy when using the MonthView as a pop-up control, and double-clicking on the date selects it and closes the popup.

  35. #3355

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by hausman View Post
    FYI, I had changed the Attribute Text.VB_UserMemId = 0 to accomplish this. Not sure which method is best.

    DateDblClick is an event in the stock MonthView control in Common Controls 2. Private Sub MonthView1_DateDblClick(ByVal DateDblClicked As Date). It comes in handy when using the MonthView as a pop-up control, and double-clicking on the date selects it and closes the popup.
    The Text property cannot have the DISPID_TEXT and DISPID_DEFAULT at the same time. Thus the hidden helper property.

    DateDblClick - ooh missed that one. However, the MonthView (SysMonthCal32 window) doesn't have the CS_DBLCLKS style, so it won't fire any WM_LBUTTONDBLCLK.

  36. #3356
    Fanatic Member
    Join Date
    Jan 2016
    Posts
    753

    Re: CommonControls (Replacement of the MS common controls)

    hi krool
    i wanted to Create a ComboBox inside a Listview as the demo in the link but it is not possible.
    The demo works fine with the MS common listview

    Create a ComboBox inside a Listview

    the error type mismatch occurs here
    Code:
    Public Sub GetLVCellData(pobjLV As ListView, _
                             psngX As Single, _
                             psngY As Single, _
                             ByRef pstrCellText As String, _
                             ByRef plngItemIndex As Long, _
                             ByRef plngSubItemIndex As Long)
        
        Dim HTI As LVHITTESTINFO
        Dim lst As ListItem
    
        With HTI
            .pt.X = (psngX \ Screen.TwipsPerPixelX)
            .pt.Y = (psngY \ Screen.TwipsPerPixelY)
            .Flags = LVHT_ONITEM
        End With
          
        SendMessage pobjLV.hwnd, LVM_SUBITEMHITTEST, 0, HTI
    
        If (HTI.iItem > -1) Then
    
            Set lst = pobjLV.ListItems(HTI.iItem + 1)
    
            plngItemIndex = HTI.iItem + 1
            plngSubItemIndex = HTI.iSubItem
            
            If HTI.iSubItem = 0 Then
                pstrCellText = pobjLV.ListItems(HTI.iItem + 1).Text
            Else
                pstrCellText = pobjLV.ListItems(HTI.iItem + 1).SubItems(HTI.iSubItem)
            End If
        Else
            pstrCellText = ""
            plngItemIndex = 0
            plngSubItemIndex = 0
        End If
    
    End Sub
    Code:
    GetLVCellData lvwDemo, _
                      X, _
                      Y, _
                      mstrOriginalCellText, _
                      mlngClickedItemIndex, _
                      mlngClickedSubItemIndex

  37. #3357

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Mustaphi View Post
    hi krool
    i wanted to Create a ComboBox inside a Listview as the demo in the link but it is not possible.
    The demo works fine with the MS common listview

    Create a ComboBox inside a Listview

    the error type mismatch occurs here
    Code:
    Public Sub GetLVCellData(pobjLV As ListView, _
                             psngX As Single, _
                             psngY As Single, _
                             ByRef pstrCellText As String, _
                             ByRef plngItemIndex As Long, _
                             ByRef plngSubItemIndex As Long)
        
        Dim HTI As LVHITTESTINFO
        Dim lst As ListItem
    
        With HTI
            .pt.X = (psngX \ Screen.TwipsPerPixelX)
            .pt.Y = (psngY \ Screen.TwipsPerPixelY)
            .Flags = LVHT_ONITEM
        End With
          
        SendMessage pobjLV.hwnd, LVM_SUBITEMHITTEST, 0, HTI
    
        If (HTI.iItem > -1) Then
    
            Set lst = pobjLV.ListItems(HTI.iItem + 1)
    
            plngItemIndex = HTI.iItem + 1
            plngSubItemIndex = HTI.iSubItem
            
            If HTI.iSubItem = 0 Then
                pstrCellText = pobjLV.ListItems(HTI.iItem + 1).Text
            Else
                pstrCellText = pobjLV.ListItems(HTI.iItem + 1).SubItems(HTI.iSubItem)
            End If
        Else
            pstrCellText = ""
            plngItemIndex = 0
            plngSubItemIndex = 0
        End If
    
    End Sub
    Code:
    GetLVCellData lvwDemo, _
                      X, _
                      Y, _
                      mstrOriginalCellText, _
                      mlngClickedItemIndex, _
                      mlngClickedSubItemIndex
    It's LvwListItem and not anymore ListItem. Also please remove the references to MS common controls.

  38. #3358
    Member
    Join Date
    Feb 2022
    Location
    Italy
    Posts
    56

    Re: CommonControls (Replacement of the MS common controls)

    It's simple to implement that?
    In the past years, I had added the manifest in my project. Hower the project was too slow

  39. #3359
    Addicted Member
    Join Date
    Jan 2012
    Posts
    245

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool, is it possible to fix columns in the listview control, like it is with the VBFlexGrid control?

  40. #3360
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,995

    Re: CommonControls (Replacement of the MS common controls)

    Hello Krool,

    I think I found a bug in the ComboBoxW: the Text property cannot be changed from inside the Click event.

    To test it, add a VB.Combo and a ComboBoxW to a form, default style Dropdown List, and this code:

    Code:
    Private Sub Form_Load()
        Combo1.AddItem "Item 1"
        Combo1.AddItem "Item 2"
        Combo1.AddItem "Item 3"
        
        ComboBoxW1.AddItem "Item 1"
        ComboBoxW1.AddItem "Item 2"
        ComboBoxW1.AddItem "Item 3"
    End Sub
    
    Private Sub Combo1_Click()
        Combo1.Text = Combo1.Text & " (" & Combo1.ListIndex & ")"
    End Sub
    
    Private Sub ComboBoxW1_Click()
        ComboBoxW1.Text = ComboBoxW1.Text & " (" & ComboBoxW1.ListIndex & ")"
    End Sub
    PS: I'm using the OCX
    Attached Files Attached Files

Page 84 of 94 FirstFirst ... 347481828384858687 ... LastLast

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