TBC Macros and Extensions

 View Only
Expand all | Collapse all

is there a way to disable the Checkboxes in a CheckedListBoxEntityPicker?

  • 1.  is there a way to disable the Checkboxes in a CheckedListBoxEntityPicker?

    Posted 04-26-2022 15:41
    I do like the CheckedListBoxEntityPicker and the ability to just set an entity type and searchcontainer.
    self.layerticklist.SearchContainer = Project.FixedSerial.LayerContainer
    self.layerticklist.UseSelectionEngine = False
    self.layerticklist.SetEntityType(clr.GetClrType(Layer), self.currentProject)
    # Description is the actual property name inside the item in ticklist.Content.Items
    sd = System.ComponentModel.SortDescription("Description", System.ComponentModel.ListSortDirection.Ascending)​

    But I would like to disable the checkboxes in one of my macros. I just need double-click and the highlighted items, which works fine.

    The thing is that
    Trimble.Vce.UI.Controls.CheckedListBoxEntityPicker does have a property ShowCheckBoxes { get; set; }

    but the one that is used in the XAML-Designer
    Trimble.Vce.UI.Controls.Wpf.CheckedListBoxEntityPicker does not have this property.

    Is there a way to inherit that property?



    ------------------------------
    Ronny Schneider
    ------------------------------


  • 2.  RE: is there a way to disable the Checkboxes in a CheckedListBoxEntityPicker?

    Posted 04-26-2022 23:43
    Hi Ronny,
    Trimble.Vce.UI.Controls.CheckedListBoxEntityPicker is the WinForms control, so it may have some different functionality than the WPF control.

    I believe there was a WinForms ListBoxEntityPicker at one time, but maybe it got removed after the CheckedListBoxEntityPicker (with a ShowCheckBoxes property) was created.

    I think the WPF and WinForms controls share common code, but their inheritance forks between the two UI technologies (i.e. so you can't "inherit it" from the WinForms side).

    I have a dim memory that there was a technical reason why the WPF control doesn't have ShowCheckBoxes...

    But maybe it's easier/possible now?  (I think Gary is out for a bit, so maybe we can poke​ @Charlie Sorg to poke the dev team)





    ------------------------------
    Quan Mueller
    Revenant Solutions - TML Development
    ------------------------------



  • 3.  RE: is there a way to disable the Checkboxes in a CheckedListBoxEntityPicker?

    Posted 04-27-2022 09:07
    I'll ask around. Thanks for the nudge @Quan Mueller

    ------------------------------
    Charlie Sorg
    TBC Product Owner, CIS
    ------------------------------