FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Style WS_TABSTOP
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Style WS_TABSTOP
Posted: Sat Aug 06, 2022 06:24 AM

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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Style WS_TABSTOP
Posted: Sat Aug 06, 2022 12:13 PM
Code (fw): Select all Collapse
oControl:SetStyle( WS_TABSTOP,  .T.  or .F. )
Regards



G. N. Rao.

Hyderabad, India
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Style WS_TABSTOP
Posted: Sat Aug 06, 2022 07:58 PM
hi,
nageswaragunupudi wrote:
Code (fw): Select all Collapse
oControl:SetStyle( WS_TABSTOP,  .T.  or .F. )

Thx for Advice.

it work for XBROWSE but crash at XIMAGE or ActiveX
greeting,

Jimmy
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Style WS_TABSTOP
Posted: Sun Aug 07, 2022 06:36 PM

Not possible.
Please give a small sample with ximage.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Style WS_TABSTOP
Posted: Tue Aug 09, 2022 01:16 AM
hi,

try this

Code (fw): Select all Collapse
#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 (fw): Select all Collapse
   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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Style WS_TABSTOP
Posted: Tue Aug 09, 2022 02:40 PM
Extremely sorry for my typo.

The method is WinStyle, not SetStyle

Code (fw): Select all Collapse
oControl:WinStyle( WS_TABSTOP,  .T.  or .F. )
Regards



G. N. Rao.

Hyderabad, India
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Style WS_TABSTOP
Posted: Tue Aug 09, 2022 07:03 PM
hi,
nageswaragunupudi wrote:The method is WinStyle, not SetStyle
Code (fw): Select all Collapse
oControl:WinStyle( WS_TABSTOP,  .T.  or .F. )

Thx for Answer.

Yes, this work now :-)
greeting,

Jimmy

Continue the discussion