converte combox -> tab control

converte combox -> tab control

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

Postby Rochinha » 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 )
...
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

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

Postby Enrico Maria Giordano » Wed Feb 07, 2007 1:55 pm

This is a working sample:

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 47 guests