ButtonBmp TABSTOP

Re: ButtonBmp TABSTOP

Postby nageswaragunupudi » Sat Jan 06, 2024 4:47 pm

wartiaga wrote:
nageswaragunupudi wrote:
Code: Select all  Expand view
? 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 view
#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
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: ButtonBmp TABSTOP

Postby Cgallegoa » Sat Jan 06, 2024 9:10 pm

Code: Select all  Expand view
#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 ***
Cgallegoa
 
Posts: 492
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador

Re: ButtonBmp TABSTOP

Postby wartiaga » Sun Jan 07, 2024 5:20 pm

nageswaragunupudi wrote:
wartiaga wrote:
nageswaragunupudi wrote:
Code: Select all  Expand view
? 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 view
#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.
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: ButtonBmp TABSTOP

Postby nageswaragunupudi » Sun Jan 07, 2024 5: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
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 75 guests