michaelk Posted April 23, 2023 Share Posted April 23, 2023 In the OIP for doors and windows, there are heading rows with a disclosure triangle and a line after the heading. > General –––––––––––––––––––– > Visualization ––––––––––––––– > ID Tag ––––––––––––––––––––– etc. Is it possible, and if so, how - is this this done in an event aware plug in? Quote Link to comment
JBenghiat Posted April 23, 2023 Share Posted April 23, 2023 I believe collapsible sections are enabled by default, but if not the hookInf file in the SDK will give you the object property to set. All you need to do is add a separator widget for each section, then indent all the widgets in that section by at least one. Quote Link to comment
michaelk Posted April 23, 2023 Author Share Posted April 23, 2023 Is it just a widget type? vsoAddWidget();? Is there an index of widget types? I'm not finding it. Quote Link to comment
Jesse Cogswell Posted April 24, 2023 Share Posted April 24, 2023 (edited) Here's a list of all the widget types from the Developer Wiki. I have separators in all of my plug-ins that are event enabled, and have successfully been able to make them collapse. One post that might help you an awful lot is this one from _c_ (though it's in Python): They go pretty in depth about Widget Groups, which is what you are looking for. Based on the code _c_ supplies, the magic code is kWidgetGroupMode = 81 and kWidgetGroupAutomatic = 2 as constants, and the call <boolean>:=SetObjPropCharVS(kObjXPropSepcialEdit,Chr(kWidgetGroupAutomatic));, then using vsoWidgetSetIndLvl to indent one level in under the headings. I've attached an updated version of the event example I wrote for you back in January that has widget grouping written into it. Quick Edit: The attached plug-in was edited in VW2023 and is now only able to be used in VW2023 or newer. Event Enabled Example.vso Edited April 24, 2023 by Jesse Cogswell 1 1 Quote Link to comment
michaelk Posted April 25, 2023 Author Share Posted April 25, 2023 Thanks Josh and Jesse That's exactly what I was looking for. It works! What is the last argument for? After the text. I thought that might set wether the separator was open or closed, but it doesn't seem to do anything. Quote Link to comment
Jesse Cogswell Posted April 25, 2023 Share Posted April 25, 2023 For vsoInsertWidget? As far as I know, the last argument doesn't do anything. According to the documentation, it's "not implemented yet." 1 Quote Link to comment
michaelk Posted April 25, 2023 Author Share Posted April 25, 2023 Thanks again, Jesse I have to remember to check the online function reference more often. I often work on scripts in situations where I don't have internet access and I'm used to using the local function reference - which doesn't have that information 🙂 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.