FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Help About TPanel?
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Help About TPanel?
Posted: Thu Sep 16, 2010 07:30 PM
Hi,

I try to use TPanel. But I could not align bottom the panel in Dialog. I use oDlg:=oPanel.

Second, I use XP manifest file, If I use it there is a one white pixel around the button. Is this normal?

Third, Font of button is changing to Courier.

Thanks,

Code (fw): Select all Collapse
#include "FiveWin.Ch"
function Main()

   local oDlg

   DEFINE DIALOG oDlg FROM 50,50 TO 250, 500 PIXEL


   ACTIVATE DIALOG oDlg ON INIT ONINIT(oDlg)

return

PROCEDURE ONINIT(oDlg)
local oPanel

   oPanel   := TPanel():New( ,,50,150, oDlg )
   oPanel:SetColor(,9425383)
   
   oDlg:oBottom := oPanel


    @ 5, 5 BUTTON btnOK PROMPT "Çıkış" OF oPanel PIXEL SIZE 50,13 
    
    Double_XY(oPanel)   
    oDlg:Refresh()
RETURN

function Double_XY(oDlg)
LOCAL i, o
    FOR i:=1 TO LEN(oDlg:aControls)
        o := oDlg:aControls[i]
        If o:IsDerivedFrom( "TCONTROL" )
            o:nLeft := o:nLeft*2
            IF Upper( o:ClassName()) $ "TGET;TMULTIGET;TBUTTON;TBTNBMP"
                o:nWidth := o:nWidth*2
                o:nHeight := o:nHeight*2
            ENDIF   
        ENDIF       
    NEXT i
    oDlg:Refresh()
RETURN Nil
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Help About TPanel?
Posted: Fri Sep 17, 2010 08:05 AM

Antonio, Daniel?

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Help About TPanel?
Posted: Tue Sep 21, 2010 03:58 AM
Hakan,

Please try these changes:
Code (fw): Select all Collapse
PROCEDURE ONINIT(oDlg)
local oPanel

   oPanel   := TPanel():New( ,,50,150, oDlg )
   oPanel:SetColor(,9425383)
   oPanel:SetFont( oDlg:oFont )
   
   oDlg:oBottom := oPanel
   oDlg:ReSize()

    @ 5, 5 BUTTON btnOK PROMPT "Çikis" OF oPanel PIXEL SIZE 50,13 
    
    Double_XY(oPanel)   
    oDlg:Refresh()
RETURN
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Help About TPanel?
Posted: Tue Sep 21, 2010 06:50 AM
Antonio Linares wrote:Hakan,

Please try these changes:
Code (fw): Select all Collapse
PROCEDURE ONINIT(oDlg)
local oPanel

   oPanel   := TPanel():New( ,,50,150, oDlg )
   oPanel:SetColor(,9425383)
   oPanel:SetFont( oDlg:oFont )
   
   oDlg:oBottom := oPanel
   oDlg:ReSize()

    @ 5, 5 BUTTON btnOK PROMPT "Çikis" OF oPanel PIXEL SIZE 50,13 
    
    Double_XY(oPanel)   
    oDlg:Refresh()
RETURN



Thanks Antonio,

oDlg:Resize() has solved the first problem.

Second, I use XP manifest file, There is a one white pixel around the button. Is this normal?


Have you seen the white pixels around the button?

Also, Why the coordinates should be doubled in on init?

Regards,
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Help About TPanel?
Posted: Wed Sep 22, 2010 12:35 PM

up

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Help About TPanel?
Posted: Thu Sep 23, 2010 06:55 AM

Hakan,

Yes, I have seen them, But it is Windows who paints those pixels.

There is no need to double the size. Just use a larger size since the start:

@ 5, 5 BUTTON btnOK PROMPT "Çikis" OF oPanel PIXEL SIZE 100, 26

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Help About TPanel?
Posted: Thu Sep 23, 2010 08:45 AM
Hi Antonio,

Antonio Linares wrote:Hakan,
Yes, I have seen them, But it is Windows who paints those pixels.


Do you mean there is not solution for it?

Antonio Linares wrote:
There is no need to double the size. Just use a larger size since the start:

@ 5, 5 BUTTON btnOK PROMPT "Çikis" OF oPanel PIXEL SIZE 100, 26


Ok. I know. I just wonder why it is?

I try to use Tpanels in Dialog. But It seems I should use dialogs in Window.

Thanks,
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06

Continue the discussion