converte combox -> tab control

Post Reply
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

converte combox -> tab control

Post by Silvio »

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
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post by Rochinha »

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 )
...
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

This is a working sample:

Code: Select all

#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
Post Reply