<@U6B7CC50S> I still don't understand why you need...
# tornadofx
e
@pim I still don't understand why you need the focusedProperty to fire for the datagrid?
p
I have two panes with data
One has an overview, the other has details
I want to be able to move items from one to the other
It should go in both directions, so overview -> details and details -> overview.
e
Drag and drop or how do you transfer data?
p
I have two buttons
e
So those buttons know which datagrid to treat as source and which to treat as destination.
And they could easily know what item is currently selected. Still don't see an issue here 🙂
p
They know via the last pane used
Since the direction can be 'flipped'
e
What does "last pane used" mean then? The last pane that received focus?
p
At first, I just checked what pane had focus, but when clicking on the button they lose focus so that was not an option
Yes, I set a property upon focus gained
e
Isn't one button to move from left to right and the other to move from right to left?
p
So : click overview pane -> set click detail pane -> set
e
If you just click the buttons, focus would never change, so this sounds like a flimsy solution.
p
You select a value from either the overview or the details
And then press a move button
They're both bound to the same data, so I need to know in what pane I selected the item to be moved
e
So you only have one button, and it should know what direction to move in automatically?
p
This is quite difficult to explain haha
e
Wouldn't it be a much better user experience if you had a << button and a >> button?
p
I have
let me make a drawing
e
But I see your issue now. Anyway, you don't really need to know what item is focused, you just need to know if the datagrid itself received focus.
p
With my mouse, so wont be pretty 🙂
e
The selected item should be retrieved from selectedItemProperty
p
Yes exactly
But - the focus property of a datagrid seems borked
e
There is no focus property on datagrid, which property specifically are you looking at?
p
I sent you my amazing artwork
c
@pim does the use case get thrown off with tabbing? if you hit the tab key and then a button, the transfer wouldn't work, right?
@pim the overview is in the datagrid?
p
@carlw Yes. I've explained it to edvin in DMs. Let me test your question
@carlw I don't see a problem since I save the last pane I used for the transfer.
c
ok. i can picture an overview field driving details, but i'm not clear on the reverse operation
p
@carlw No problem, thanks for your attention 🙂