Page 1 of 1

combox control convert to tab control

Posted: Thu Dec 01, 2005 9:19 pm
by Silvio
on a dialog I have a combobox

Code: Select all

 REDEFINE COMBOBOX oCbx VAR cVar ITEMS aIdx ID 210 OF oDlg;
      ON CHANGE Sel_Index(oCbx)


...
STAT FUNC Sel_Index(oCbx)
   (oDCli)->(OrdSetFocus(oCbx:nAt))
   oBCli:Refresh()
   oBCli:SetFocus()
   oBCli:aHeaders[5]:=IF(oCbx:nAt=5,"Vendita Netta","Saldo Attuale")
RETURN (NIL)



I want insert on the botton of dialog a Tab with the same operation but when i try it make error
i try with

Code: Select all

@ ( oDlg:nHeight / 2 ) - 11, nBrwSplit+2 TABS oCbx  ;
    SIZE oWnd:nWidth() - 80, 12 ;
    PIXEL ;
    OF oDlg ;
    ITEMS aIdx ;
    COLOR CLR_BLACK, GetSysColor(15) - rgb( 30, 30, 30 ); // 13362404  ;
  action  Sel_Index(oCbx

How can I make it to click on each tabs and index the listbox and focus on the order i selected ?

Thanks in advance

Posted: Mon Dec 05, 2005 8:48 pm
by Antonio Linares
Silvio,

What error do you get ?

Posted: Tue Dec 06, 2005 12:07 am
by Silvio
when I insert this code

Code: Select all

 @ ( oDlg:nHeight / 2 ) - 11, nBrwSplit+2 TABS oCbx  ;
    SIZE oWnd:nWidth() - 80, 12 ;
    PIXEL ;
    OF oDlg ;
    ITEMS aIdx ;
    COLOR CLR_BLACK, GetSysColor(15) - rgb( 30, 30, 30 ); // 13362404  ;
  action  Sel_Index(oCbx)


make this error



Application
===========
Path and name: C:\Work\prg\maga32\maga32.Exe (32 bits)
Size: 797,696 bytes
Time from start: 0 hours 0 mins 1 secs
Error occurred at: 06/12/2005, 01:05:31
Error description: Error BASE/1126 Argument error: STRTRAN
Args:
[ 1] = A { ... }
[ 2] = C &
[ 3] = C

Stack Calls
===========
Called from STRTRAN(0)
Called from TTABS:DEFAULT(305)
Called from TTABS:NEW(122)
Called from MAW110(191)
Called from (b)PERFORM(237)
Called from PERFORM(238)
Called from (b)MAWIND(159)
Called from TBTNBMP:CLICK(0)
Called from TBTNBMP:LBUTTONUP(0)
Called from TWINDOW:HANDLEEVENT(0)
Called from TBTNBMP:HANDLEEVENT(0)
Called from _FWH(0)
Called from WINRUN(0)
Called from TMDIFRAME:ACTIVATE(0)
Called from MAWIND(25)