FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour converte combox -> tab control
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
converte combox -> tab control
Posted: Wed Feb 07, 2007 12:16 AM

I load nto an arrary 3 strings ..

local aIdx:={}

aIdx:={"Fondatore","Ordinario","Simpatizzante","Servizi"}

On old program I use a combox to select the option

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

Now I want show the option into a tab control

@ nGridBottom, nSplit+2 TABS oApp():oTab ;
OPTION nOrder SIZE oApp():oWndMain:nWidth()-80, 12 PIXEL OF oApp():oDlg ;
ITEMS aIdx

but it not run ok

can U help me pls

Best Regards, Saludos



Falconi Silvio
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
converte combox -> tab control
Posted: Wed Feb 07, 2007 12:45 AM

Silvio

The TAB control can choosed by using SetOption method and the page too.

...
oTab:SetOption( nOrder )
oPage:SetOption( nOrder ) or oPage:SetOption( oTab:nOption )
...

Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
converte combox -> tab control
Posted: Wed Feb 07, 2007 12:45 PM

Dear Rochinha
If you not understood what I say , please not write me

the command setoption use when I must show a tab

Instead I ask another help .....

I must write the tab name "xxxxx","xxxxx", "xxxxx" they called ITEMS or aPrompts

On the combobos I use ITEMS aaa where aaa is an array with 3 strings

Now I want insert these strings into tab control as tab names

I hope you unserstand me now

Best Regards, Saludos



Falconi Silvio
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
converte combox -> tab control
Posted: Wed Feb 07, 2007 01:55 PM
This is a working sample:

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL oTabs

    DEFINE DIALOG oDlg

    @ 0, 0 BUTTON "Change";
           ACTION ( oTabs:aPrompts[ 2 ] := "Changed",;
                    oTabs:Refresh() )

    @ 2, 0 TABS oTabs;
           PROMPTS "First", "Second", "Third"

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG

Continue the discussion