Hello,
VZ> You can use GetFieldRect() for this, but it would be better to
avoid handling clicks on the status bar itself, as this is not
guaranteed to work if a native control is used (although it does work in
practice right now), and instead embed a custom control in the status
bar and handle clicks in it instead. The statbar sample shows how to do
this.
I have tried GetFieldRect, and it's enough for now, thank you. It works
well.
I have had a look at the statbar sample, but I don't well understand how
the custom controls are added to the status bar.
Is it enough for a control to have the status bar as a parent to be part
of it ? There's nothing else to do ?
Is creating a subclass of wxStatusBar mandatory ?
I have the impression that I have missed something important.
DC> Rather than binding to the up event, you might want to bind to the
click event. For instance, I support context menus and double click on
my status bar
...
I then walk down all the fields and check which rect it's in. (Note, the
GetPosition() for context menus and mouseevents is different - the first
is in screen coords, the 2nd in client)
Well done, I have been caught by the trap !
is there a reason why the coordinates of a context menu event are in
screen and not client coordinates ?
Thank you for your help.
And good evening / night.