macs Posted August 31, 2020 Report Share Posted August 31, 2020 Pessoal, alguém sabe como esconder um combobox e o say. Gostaria de esconder em runtime mas não funciona. oCombo:Hide() e oSay:Hide()... não funciona. oCombo:Visible := .F. --> não funciona. oSay:Visible := .F. --> não funciona. Estes componentes só vem escondidos se eu informar a propriedade Visible = False no Pelles; Desde já agradeço. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 31, 2020 Report Share Posted August 31, 2020 Tem certeza? Teste agora... //..\SAMPLES\COMBOS.PRG y COMBOS.RC // Showing the use of different styles of ComboBoxes controls #include "FiveWin.ch" #include "Combos.ch" //----------------------------------------------------------------------------// STATIC oCbx1, oCbx2, oCbx3 function Main() local oDlg, oSay // COMENTADO // local oCbx1, oCbx2, oCbx3 local cItem1, cItem2 := " ", cItem3, cItem4 := "None" local aItems := { "D-3200 D3100",; "D-3200W/18 D3100W",; "D-7000W/18 D3200",; "D-90 D-3200",; "D3100 D-3200W/18",; "D3100W D5100",; "D3200 D5200",; "D5100 D7000",; "D5200 D7000W/18",; "D7000 D90",; "D90 D-90" } SET _3DLOOK ON SkinButtons() DEFINE DIALOG oDlg RESOURCE "Combos" REDEFINE COMBOBOX oCbx1 VAR cItem1 ITEMS { "One", "Two", "Three" } ; ID ID_SIMPLE OF oDlg ; ON CHANGE ( cItem4 := cItem1, oSay:Refresh() ) ; VALID ( cItem4 := cItem1, oSay:Refresh(), .t. ) REDEFINE COMBOBOX oCbx2 VAR cItem2 ITEMS aItems ; ID ID_DROPDOWN OF oDlg ; STYLE CBS_DROPDOWN ; ON CHANGE ( cItem4 := cItem2, oSay:Refresh() ) ; VALID ( If( ! oCbx2:Find( oCbx2:oGet:GetText() ),; oCbx2:Add( oCbx2:oGet:GetText() ),), .t. ) REDEFINE COMBOBOX oCbx3 VAR cItem3 ITEMS { "One", "Two", "Three" } ; ID ID_DROPDOWNLIST OF oDlg ; ON CHANGE ( cItem4 := cItem3, oSay:Refresh() ) ; VALID ( cItem4 := cItem3, oSay:Refresh(), .t. ) REDEFINE SAY oSay PROMPT cItem4 ID ID_SELECTION OF oDlg COLOR "R+/W" ACTIVATE DIALOG oDlg CENTERED ; ON INIT( oCbx3:Hide(), oSay:Hide() ) return nil //----------------------------------------------------------------------------// Saudações. Quote Link to comment Share on other sites More sharing options...
macs Posted August 31, 2020 Author Report Share Posted August 31, 2020 Funcionou! Apenas inclusão do código em "ON INIT" ON INIT( oCbx3:Hide(), oSay:Hide() ) Valeu Kapiaba! Quote Link to comment Share on other sites More sharing options...
alex2002 Posted August 31, 2020 Report Share Posted August 31, 2020 Você deu um refresh() no objeto após colocar Hide() ou Show() ? Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted September 1, 2020 Report Share Posted September 1, 2020 Na linha do objeto say e combo, acrescenta UPDATE. Após o :Hide() ou : Show () vc acrescenta oDlg:Update () Quote Link to comment Share on other sites More sharing options...
kapiaba Posted September 1, 2020 Report Share Posted September 1, 2020 Não há necessidade disse com o Hide() e Show() my dear friend. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.