ButtonBmp TABSTOP

User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: ButtonBmp TABSTOP

Post by nageswaragunupudi »

wartiaga wrote:
nageswaragunupudi wrote:

Code: Select all | Expand

? 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: Select all | Expand

#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
Cgallegoa
Posts: 494
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador
Contact:

Re: ButtonBmp TABSTOP

Post by Cgallegoa »

Code: Select all | Expand

#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-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
wartiaga
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: ButtonBmp TABSTOP

Post by wartiaga »

nageswaragunupudi wrote:
wartiaga wrote:
nageswaragunupudi wrote:

Code: Select all | Expand

? 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: Select all | Expand

#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.
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: ButtonBmp TABSTOP

Post by nageswaragunupudi »

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
Post Reply