Whilst I was controlling the order when tabbing through GETs and keeping buttons that should not have been tabbed through avoided, there remained the issue of these buttons grabbing the focus when clicked on.
That was relatively easy to fix by adding the following code to buttons.c
Code: Select all
HB_FUNC( BTNNOFOCUS )
{
gtk_button_set_focus_on_click( GTK_BUTTON( hb_parnl( 1 ) ), FALSE );
}
Code: Select all
METHOD SetNoFocusOnClick() INLINE BtnNoFocus( ::hWnd )
Code: Select all
oBtn:SetNoFocusOnClick()
I note that this might be very useful for buttons on toolbars.
Also a question to Antonio and other users. Should this be an option on BUTTON creation - in other words should @ row, col BUTTON command have a new clause, maybe NOFOCUS, to support such a capability directly rather than code along the following lines
Code: Select all
@ row, col BUTTON oBtn PROMPT "Some Prompt" ACTION( etc
oBtn:SetNoFocusOnClick()
Code: Select all
@ row, col BUTTON "Some Prompt" NOFOCUS ACTION( etc
Doug
(xProgrammer)