FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ButtonBmp TABSTOP
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: ButtonBmp TABSTOP
Posted: Sat Jan 06, 2024 04:47 PM
wartiaga wrote:
Code (fw): Select all Collapse
? oBtn:WinStyle( WS_TABSTOP ) --> lActive
oBtn:WinStyle( WS_TABSTOP,  .T.  (or) .F. ) // Enable/Disable the TabStop style
Mr. Nages

Desn't work. In the TABSTOP option of the button in Pelles c I set it to YES but when I use oBtn:WinStyle( WS_TABSTOP, .F. ) it it still continues obeying the initial TABSTOP.

Thank you!
No.
This should work and in fact this works.

Keep this in ON INIT clause.

In the above example, according to the RC file, tabstop for oBtn[ 2 ] is inactive and tabstop for oBtn[ 1 ] and oBtn[ 2 ] are active.

Please try this program. Here we enable tabstop for the second button and disable tabstop for the 3rd button.
Code (fw): Select all Collapse
#include "FiveWin.ch"

Function Main()

  LOCAL oDlg, oBtn[3]

    DEFINE DIALOG oDlg RESOURCE "TEST"

    REDEFINE BUTTONBMP oBtn[1] PROMPT "&One" ID 201 OF oDlg ACTION MsgInfo("One")
    REDEFINE BUTTONBMP oBtn[2] PROMPT "&Two" ID 202 OF oDlg ACTION MsgInfo("Two - Without TabStop")
    REDEFINE BUTTONBMP oBtn[3] PROMPT "&Three" ID 203 OF oDlg ACTION MsgInfo("Three")

    oDlg:bInit := { || oBtn[2]:WinStyle( WS_TABSTOP, .T. ), oBtn[3]:WinStyle( WS_TABSTOP, .F. ) }

    ACTIVATE DIALOG oDlg CENTERED

RETURN NIL
Regards



G. N. Rao.

Hyderabad, India
Posts: 514
Joined: Sun Oct 16, 2005 03:32 AM
Re: ButtonBmp TABSTOP
Posted: Sat Jan 06, 2024 09:10 PM
Code (fw): Select all Collapse
#include "FiveWin.ch"

Function Main()
  LOCAL oDlg, oBtn[3]

    DEFINE DIALOG oDlg RESOURCE "TEST"

    REDEFINE BUTTONBMP oBtn[1] PROMPT "&Active TS" ID 201 OF oDlg ACTION (oBtn[2]:WinStyle(WS_TABSTOP,.T.), oBtn[2]:Refresh())
    REDEFINE BUTTONBMP oBtn[2] PROMPT "&Two" ID 202 OF oDlg ACTION MsgInfo("Two - Without TabStop")
    REDEFINE BUTTONBMP oBtn[3] PROMPT "&Disabe TS" ID 203 OF oDlg ACTION (oBtn[2]:WinStyle(WS_TABSTOP,.F.), oBtn[2]:Refresh())
 
    ACTIVATE DIALOG oDlg CENTERED

RETURN NIL

Saludos,



Carlos Gallego



*** FWH-25.12, xHarbour 1.3.1 Build 20241008, Borland C++7.70, PellesC, ADS 11.1***

Posts: 253
Joined: Wed May 25, 2016 01:04 AM
Re: ButtonBmp TABSTOP
Posted: Sun Jan 07, 2024 05:20 PM
nageswaragunupudi wrote:
Code (fw): Select all Collapse
? oBtn:WinStyle( WS_TABSTOP ) --> lActive
oBtn:WinStyle( WS_TABSTOP,  .T.  (or) .F. ) // Enable/Disable the TabStop style
Mr. Nages

Desn't work. In the TABSTOP option of the button in Pelles c I set it to YES but when I use oBtn:WinStyle( WS_TABSTOP, .F. ) it it still continues obeying the initial TABSTOP.

Thank you!
No.
This should work and in fact this works.

Keep this in ON INIT clause.

In the above example, according to the RC file, tabstop for oBtn[ 2 ] is inactive and tabstop for oBtn[ 1 ] and oBtn[ 2 ] are active.

Please try this program. Here we enable tabstop for the second button and disable tabstop for the 3rd button.
Code (fw): Select all Collapse
#include "FiveWin.ch"

Function Main()

  LOCAL oDlg, oBtn[3]

    DEFINE DIALOG oDlg RESOURCE "TEST"

    REDEFINE BUTTONBMP oBtn[1] PROMPT "&One" ID 201 OF oDlg ACTION MsgInfo("One")
    REDEFINE BUTTONBMP oBtn[2] PROMPT "&Two" ID 202 OF oDlg ACTION MsgInfo("Two - Without TabStop")
    REDEFINE BUTTONBMP oBtn[3] PROMPT "&Three" ID 203 OF oDlg ACTION MsgInfo("Three")

    oDlg:bInit := { || oBtn[2]:WinStyle( WS_TABSTOP, .T. ), oBtn[3]:WinStyle( WS_TABSTOP, .F. ) }

    ACTIVATE DIALOG oDlg CENTERED

RETURN NIL
Thank you Nages for the help look:

My button line:

REDEFINE BUTTONBMP botaonfs ID 4031 of Folder1:aDialogs[2] Bitmap "DIGNOTAS" TRANSPARENT TOOLTIP "Informar Nfe(s)";
cancel action CadNfs()

Folder1:aDialogs[2]:bInit := { || botaonfs:WinStyle( WS_TABSTOP, .F. ) } // This is correct? If Yes dont work.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: ButtonBmp TABSTOP
Posted: Sun Jan 07, 2024 05:23 PM

I tested with a sample posted earlier in this thread it is working.

If it is not working in another program, please post your code which is not working for you along with your rc file.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion