1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

ComboBox

Discussão em 'Progress 4GL' iniciado por sl4v3r, Abril 8, 2009.

  1. sl4v3r

    sl4v3r Membro Participativo

    Exemplo simples de ComboBox.

    Código:
    DEFINE VARIABLE l_ok   AS LOGICAL.
    DEFINE BUTTON BT-SAIR           LABEL "Sair".
    DEFINE VARIABLE c_estado AS CHARACTER FORMAT "x(30)"
           VIEW-AS COMBO-BOX inner-lines 5.  
    
    DEFINE FRAME main-frame
       c_estado LABEL 'Escolha o estado'
       skip
       BT-SAIR
       with width 60 centered overlay view-as dialog-box
       side-labels title " Estados do Brasil ".
    
    on return of BT-SAIR in frame main-frame DO:
       MESSAGE "O estado escolhido foi " INPUT FRAME main-frame c_estado VIEW-AS ALERT-BOX.
       apply "close" to frame main-frame.
    end.
    
    FOR EACH estados
    NO-LOCK:
       c_estado:ADD-last(estado.codigo + " - " + estado.nome).
    END.
       
    ENABLE c_estado
           BT-SAIR
           WITH FRAME main-frame.
    
    wait-for close of frame main-frame. 
    

Compartilhe esta Página