Style WS_TABSTOP

Post Reply
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Style WS_TABSTOP

Post by Jimmy »

hi,

it seems all Control have default Style WS_TABSTOP.

when have e.g. XIMAGE or ActiveX it "TabStop" when press "TAB" and Control got Focus

but when have TGET, TCOMBOBOX in same Form i like to have WS_TABSTOP only on Control which can "change" (User Action) Result.

is there a (easy) Method to change ::style of Control :?:
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: Style WS_TABSTOP

Post by nageswaragunupudi »

Code: Select all | Expand

oControl:SetStyle( WS_TABSTOP,  .T.  or .F. )
Regards

G. N. Rao.
Hyderabad, India
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Style WS_TABSTOP

Post by Jimmy »

hi,
nageswaragunupudi wrote:

Code: Select all | Expand

oControl:SetStyle( WS_TABSTOP,  .T.  or .F. )

Thx for Advice.

it work for XBROWSE but crash at XIMAGE or ActiveX
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: Style WS_TABSTOP

Post by nageswaragunupudi »

Not possible.
Please give a small sample with ximage.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Style WS_TABSTOP

Post by Jimmy »

hi,

try this

Code: Select all | Expand

#include "fivewin.ch"

PROCEDURE Main()
LOCAL oDlg, oFont, oImage
   DEFINE FONT oFont NAME "TAHOMA" SIZE 0, - 12
   DEFINE WINDOW oDlg FROM 0, 0 TO 600, 800 + 16 PIXEL TITLE "TVIP " COLOR RGB(025,254,255), CLR_BLACK

      @ 310, 330 XIMAGE oImage SIZE 64, 64 OF oDlg                    // NOBORDER
      oImage:lBmpTransparent := .F.
      oImage:bLDblClick := { || MsgInfo( "Hello World" ) }
      // Crash here
      oImage:SetStyle( WS_TABSTOP, .F. )

   ACTIVATE WINDOW oDlg CENTERED
RETURN

or this

Code: Select all | Expand

  iMax := LEN(oObj:aControls)
   FOR ii := 1 TO iMax
     oControl := oObj:aControls[ii]
      DO CASE
         CASE "TSAY"       $ oControl:ClassName()
              * oControl:SetStyle( WS_TABSTOP, .F. ) // crash
         CASE "TGET"       $ oControl:ClassName()

         CASE "FWTVLC"     $ oControl:ClassName()
               * oControl:SetStyle( WS_TABSTOP, .F. ) // crash
         CASE "TXBROWSE"   $ oControl:ClassName()
               oControl:SetStyle( WS_TABSTOP, .F. )   // work
         CASE "TXIMAGE"    $ oControl:ClassName()
               * oControl:SetStyle( WS_TABSTOP, .F. ) // crash
         CASE "TRADIO"     $ oControl:ClassName()
               * oControl:SetStyle( WS_TABSTOP, .F. ) // crash
         CASE "TBUTTON"    $ oControl:ClassName()
               oControl:SetStyle( WS_TABSTOP, .F. )   // work
         CASE "TBTNBMP"    $ oControl:ClassName()
              * oControl:SetStyle( WS_TABSTOP, .F. )  // crash
      ENDCASE

Error description: Error BASE/1004 Message not found: TXIMAGE:SETSTYLE
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: Style WS_TABSTOP

Post by nageswaragunupudi »

Extremely sorry for my typo.

The method is WinStyle, not SetStyle

Code: Select all | Expand

oControl:WinStyle( WS_TABSTOP,  .T.  or .F. )
Regards

G. N. Rao.
Hyderabad, India
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Style WS_TABSTOP

Post by Jimmy »

hi,
nageswaragunupudi wrote:The method is WinStyle, not SetStyle

Code: Select all | Expand

oControl:WinStyle( WS_TABSTOP,  .T.  or .F. )

Thx for Answer.

Yes, this work now :D
greeting,
Jimmy
Post Reply