Jmsilva Posted March 5, 2014 Report Share Posted March 5, 2014 Gostaria de saber como mudar a cor "branca" do GET quando ele for desabilitado pelo método :Disable(). Valeu !!! Quote Link to comment Share on other sites More sharing options...
Erciley Junior Posted March 5, 2014 Report Share Posted March 5, 2014 Olá, creio que é só alterar as linhas destacadas na classe tGet Quote Link to comment Share on other sites More sharing options...
Theotokos Posted March 5, 2014 Report Share Posted March 5, 2014 oGet:lDisColors := .F. oGet:nClrText := SuaCordoTexto oGet:nClrPane := SuaCordoFundo Tenta isto.... Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted March 6, 2014 Author Report Share Posted March 6, 2014 NÃO FUNFOU !!! VALEU oGet:lDisColors := .F. oGet:nClrText := SuaCordoTexto oGet:nClrPane := SuaCordoFundo Tenta isto.... Não funcionou, valeu !!! Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 6, 2014 Report Share Posted March 6, 2014 Qual é a versão do seu FWH? Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted March 7, 2014 Author Report Share Posted March 7, 2014 Qual é a versão do seu FWH? Versão: 11.2010 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 7, 2014 Report Share Posted March 7, 2014 Não é possivel mudar a cor quando com WHEN( .F. ), mas dá para deixar mais visivel. METHOD Paint() CLASS TGet local aInfo := ::DispBegin() Local hOldFont //-> Mudan‡as Feitas em 22/12/2005 Por Antonio Linares //-> Para que o When(.F.) do GET, fique colorido normal. Muito bom. Joao. if ::oBrush != nil FillRect( ::hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush ) else CallWindowProc( ::nOldProc, ::hWnd, WM_ERASEBKGND, ::hDC, 0 ) endif if IsWindowEnabled( ::hWnd ) CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 ) else SetTextColor( ::hDC, ::nClrText ) SetBkColor( ::hDC, ::nClrPane ) hOldFont = SelectObject( ::hDC, ::oFont:hFont ) do case case lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_CENTER ) SetTextAlign( ::hDC, TA_CENTER ) ExtTextOut( ::hDC, 0, ::nWidth() / 2, ; { 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) ) case lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_RIGHT ) SetTextAlign( ::hDC, TA_RIGHT ) ExtTextOut( ::hDC, 0, ::nWidth() - 4, ; { 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) ) otherwise SetTextAlign( ::hDC, TA_LEFT ) ExtTextOut( ::hDC, 0, 0, ; { 0, 0, ::nHeight(), ::nWidth() }, GetWindowText( ::hWnd ) ) endcase SelectObject( ::hDC, hOldFont ) endif if ValType( ::bPainted ) == "B" Eval( ::bPainted, ::hDC, ::cPS, Self ) endif ::DispEnd( aInfo ) return 1 Quote Link to comment Share on other sites More sharing options...
Erciley Junior Posted March 7, 2014 Report Share Posted March 7, 2014 Kapiaba, você está errado, dá para mudar, é só alterar onde deixei grifado e nas duas linhas abaixo. Quem postou parece que não lê, senão já teria encerrado o tópico. Desculpe a sinceridade, abraço. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 7, 2014 Report Share Posted March 7, 2014 Kapiaba, você está errado, dá para mudar, é só alterar onde deixei grifado e nas duas linhas abaixo. Quem postou parece que não lê, senão já teria encerrado o tópico. Desculpe a sinceridade, abraço. A versão dele não tem os novos recursos... Quote Link to comment Share on other sites More sharing options...
Erciley Junior Posted March 7, 2014 Report Share Posted March 7, 2014 Versão dele é a 11, a minha é a 08 e 02.6... Bom... negócio é aproveitar o final de semana, abraço. ^^ 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.