Jump to content
Fivewin Brasil

botao


Alain da Silva

Recommended Posts

boa tarde pessoal, preciso criar 100 botões.

dessa forma é possível saber qual botão clicou ou existe outra maneira de se criar com mais facilidade

  FOR NID := 102 TO 201
     NBT:=1
     REDEFINE SBUTTON OBOTAOM[NBT] ID NID ;
              ACTION  * * * * SBER QUAL BOTÃO CLICOU * * *
              TOOLTIP "Clique aqui para efetuar vendas por telefone" ;
              COLORS PRETO,CORTABELA;
              FONT FNORMAL;
              OFFICE OF DLGVEN
     NBT+=1
  NEXT NID

Link to comment
Share on other sites

Crie uma função para isso...

   For i := 1 TO 100
      CriaBotao(i)
   End
   
Procedure CriaBotao( nCont )

   REDEFINE SBUTTON    OBOTAOM[nCont];
            ID         (nCont+101); //-- 101 + 1 = 102 até 101 + 100 = 201
            ACTION     Botao(nCont)
            TOOLTIP    "Clique aqui para efetuar vendas por telefone" ;
            COLORS     PRETO,CORTABELA;
            FONT       FNORMAL;
            OFFICE;
            OF       DLGVEN
            
Return

Procedure Botao( nCont )
   
   ? "Botão pressionado foi o : " + Str( nCont )
   
Return            
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...