Help About TPanel?

Help About TPanel?

Postby Horizon » Thu Sep 16, 2010 7:30 pm

Hi,

I try to use TPanel. But I could not align bottom the panel in Dialog. I use oDlg:oBottom:=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: Select all  Expand view
#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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Help About TPanel?

Postby Horizon » Fri Sep 17, 2010 8:05 am

Antonio, Daniel?
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Help About TPanel?

Postby Antonio Linares » Tue Sep 21, 2010 3:58 am

Hakan,

Please try these changes:
Code: Select all  Expand view

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Help About TPanel?

Postby Horizon » Tue Sep 21, 2010 6:50 am

Antonio Linares wrote:Hakan,

Please try these changes:
Code: Select all  Expand view

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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Help About TPanel?

Postby Horizon » Wed Sep 22, 2010 12:35 pm

up
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Help About TPanel?

Postby Antonio Linares » Thu Sep 23, 2010 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Help About TPanel?

Postby Horizon » Thu Sep 23, 2010 8: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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 85 guests