FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour creating a panel with border
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
creating a panel with border
Posted: Mon May 21, 2018 06:37 PM

I wish create a colored panel but I cannot show the border ...why ?
this is the sources :

oPanelCustomer:=Tpanel():New( 35, 5, 55, oFld:aDialogs[1]:nWidth-5, oFld:aDialogs[1])
 oPanelCustomer:SetBrush( oBrushGreen )
 oPanelCustomer:WinStyle(WS_BORDER, .t.)
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Re: creating a panel with border
Posted: Mon May 21, 2018 08:49 PM
Test with bPainted

Code (fw): Select all Collapse
oPanel : bPainted := { | hDc | FunctionPaint( hDc ) }


Code (fw): Select all Collapse
Function FunctionPaint( hDc )

    Local hOldPen
    Local hPen := CreatePen( PS_SOLID, 1, Rgb( 125, 125, 125 ) )
    
    hOldPen := SelectObject( hDc, hPen )    
    Rectangle( hDc, 1, 1, oPanel : nHeight - 1 , oPanel : nWidth - 1 )
    SelectObject( hDc, hOldPen )
    DeleteObject( hPen )
    Return Nil


Saludos
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: creating a panel with border
Posted: Tue May 22, 2018 03:53 PM

I see the border but the panel lose the brush color I insert it

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: creating a panel with border
Posted: Wed May 23, 2018 02:58 PM
Code (fw): Select all Collapse
   oPanel:bPainted := { || oPanel:Box( 1,1,oPanel:nHeight-1,oPanel:nWidth-1 ) }
Regards



G. N. Rao.

Hyderabad, India
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: creating a panel with border
Posted: Wed May 23, 2018 04:16 PM
thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion