Add a behavior to a datagrid group ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Add a behavior to a datagrid group ?
Hello, there is a solution to add a behavior to a datagrid group ?
(no column behavior, or header behavior, but a general behavior like all other groups/buttons/etc...)
Thank you =)
(no column behavior, or header behavior, but a general behavior like all other groups/buttons/etc...)
Thank you =)
Re: Add a behavior to a datagrid group ?
Hi ZoOoOop,
welcome to the forum!
Sure this is possible, you can assign a behavior to every LC object.
If it will make sense is another question. A datagrid is a complex beast!
Best
Klaus
welcome to the forum!
Sure this is possible, you can assign a behavior to every LC object.
If it will make sense is another question. A datagrid is a complex beast!
Best
Klaus
Re: Add a behavior to a datagrid group ?
Thank you for answer but for example in any "normal group" i have it but not in "datagrid group" (see attachments)
Re: Add a behavior to a datagrid group ?
Ah, OK, obviously not via the inspector, but works fine via message box:
Tested and works!
Will however completely overwrite the "normal" datagrid behavior!
Code: Select all
set the behavior of grp 1 to the long ID of btn 1
Will however completely overwrite the "normal" datagrid behavior!
Re: Add a behavior to a datagrid group ?
But we can use nested behaviors with the datagrid, check a demo on Github:
https://github.com/bwmilby/lc-misc
Hope that helps.
https://github.com/bwmilby/lc-misc
Hope that helps.
Re: Add a behavior to a datagrid group ?
I succeed to change behavior like this OK, but :Klaus wrote: ↑Sun Feb 27, 2022 3:44 pmAh, OK, obviously not via the inspector, but works fine via message box:Tested and works!Code: Select all
set the behavior of grp 1 to the long ID of btn 1
Will however completely overwrite the "normal" datagrid behavior!
On my data grid -> "put the behavior of group "DG_MYGRID" -> button id 1005 of stack "revDataGridLibrary"
put the behavior of button id 1005 of stack "revDataGridLibrary" -> stack "RevDataGridLibraryBehaviorsDataGridButtonBehavior"
Even if i add ["button id 1005 of stack "revDataGridLibrary"] or [stack "RevDataGridLibraryBehaviorsDataGridButtonBehavior"] in my new empty button behavior, the data grid don't work yet...
I will go to see your link now.
(edit : it's exactly that i try to do, i will debug with that to see where i'm wrong)
Re: Add a behavior to a datagrid group ?
Great!
May I ask what special behavior you added to your datagrid?
May I ask what special behavior you added to your datagrid?
Re: Add a behavior to a datagrid group ?
Actually that’s interesting.
I have a bunch of data grids with semi-translucent scroll bars that hide with a swift transition when the scrolling stops, and reappear and can be dragged when the scrolling starts.
I’ve had to put that code within each individual DG as you can’t really subclass stuff, would be a lot handier if this could be set as a behaviour… will definitely look into this!
I have a bunch of data grids with semi-translucent scroll bars that hide with a swift transition when the scrolling stops, and reappear and can be dragged when the scrolling starts.
I’ve had to put that code within each individual DG as you can’t really subclass stuff, would be a lot handier if this could be set as a behaviour… will definitely look into this!