Style WS_TABSTOP

Style WS_TABSTOP

Postby Jimmy » Sat Aug 06, 2022 6: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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Style WS_TABSTOP

Postby nageswaragunupudi » Sat Aug 06, 2022 12:13 pm

Code: Select all  Expand view  RUN
oControl:SetStyle( WS_TABSTOP,  .T.  or .F. )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Style WS_TABSTOP

Postby Jimmy » Sat Aug 06, 2022 7:58 pm

hi,
nageswaragunupudi wrote:
Code: Select all  Expand view  RUN
oControl:SetStyle( WS_TABSTOP,  .T.  or .F. )

Thx for Advice.

it work for XBROWSE but crash at XIMAGE or ActiveX
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Style WS_TABSTOP

Postby nageswaragunupudi » Sun Aug 07, 2022 6:36 pm

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Style WS_TABSTOP

Postby Jimmy » Tue Aug 09, 2022 1:16 am

hi,

try this

Code: Select all  Expand view  RUN
#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 view  RUN
  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
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Style WS_TABSTOP

Postby nageswaragunupudi » Tue Aug 09, 2022 2:40 pm

Extremely sorry for my typo.

The method is WinStyle, not SetStyle

Code: Select all  Expand view  RUN
oControl:WinStyle( WS_TABSTOP,  .T.  or .F. )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Style WS_TABSTOP

Postby Jimmy » Tue Aug 09, 2022 7:03 pm

hi,
nageswaragunupudi wrote:The method is WinStyle, not SetStyle
Code: Select all  Expand view  RUN
oControl:WinStyle( WS_TABSTOP,  .T.  or .F. )

Thx for Answer.

Yes, this work now :D
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Otto and 47 guests