Resizing dialog , object TGROUP

Resizing dialog , object TGROUP

Postby Frank Demont » Wed Aug 23, 2006 12:14 pm

Hello

When in a dialog an object tgroup is present , next code doesn't work properly ( a BUG ???)

When the dialog appears , the other controls (tget , button) are not visible , unless TAB is pressed

Closing the dialog gives also errors .

Code: Select all  Expand view

#include "FiveWin.ch"

function Main(cNum)

   local oDlg, nTest := 1, oIcon
   DEFAULT cNum := "1"
   DEFINE ICON oIcon RESOURCE "test"

   DEFINE DIALOG oDlg RESOURCE "Test" ICON oIcon
   REDEFINE GET nTest ID 101 SPINNER
   REDEFINE BUTTON ID 200 ACTION olg:end()
   REDEFINE BUTTON ID 210 ACTION olg:end()
   REDEFINE GROUP ID 2 OF oDlg

   ACTIVATE DIALOG oDlg CENTERED ON INIT ResizeDlg(oDlg , VAL(cNum))

return nil

********************************************************************************
PROC ResizeDlg(oDlg , F)
*********************
LOCAL aHlp[5] , lNewFont := .T. , NewFontH , oFont   , oCtl
DEFAULT F := {2 , 2}
IF VALTYPE(f) == "N"
  f := {f,f}
END
WITH OBJECT oDlg
  aHlp[1] := :nTop              // nTop
  aHlp[2] := :nLeft              // nLeft
  aHlp[3] := :nWidth()*F[1]              // nWidth
  aHlp[4] := :nHeight()*F[2]              // nHeight
  :Move( aHlp[1] , aHlp[2] , aHlp[3] , aHlp[4] , .T. )
  FOR EACH oCtl IN oDlg:aControls
    aHlp[1] := oCtl:nTop*F[2]              // nTop
    aHlp[2] := oCtl:nLeft*F[1]              // nLeft
    aHlp[3] := oCtl:nWidth*F[1]              // nWidth
    aHlp[4] := oCtl:nHeight*F[2]               // nHeight
    oCtl:Move( aHlp[1] , aHlp[2] , aHlp[3] , aHlp[4] , .T. )
    lNewFont := (oCtl:ClassName <> "TGROUP")
    IF lNewFont
      NewFontH := ROUND(oCtl:oFont:nHeight*F[2],0)
      oFont := oClone(oCtl:oFont)
      cFaceName := oFont:cFaceName
      oFont:end()
      DEFINE FONT oFont NAME cFaceName SIZE 0, -NewFontH
      oCtl:SetFont(ofont)
      oCtl:refresh()
    END
  NEXT
END
IF oDlg:lCentered
  oDlg:center()
END
RETURN

#include "winapi.ch"
//#include "..\include\winapi.ch"

test ICON "..\icons\fivewin.ico"

TEST DIALOG 61, 39, 194, 139
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Testing Spinners"
FONT 8, "Tahoma"
{
EDITTEXT 101, 44, 25, 106, 15, WS_BORDER | WS_VSCROLL | WS_TABSTOP
DEFPUSHBUTTON "OK", 200 , 42, 96, 50, 14
PUSHBUTTON "Cancel", 210 , 102, 96, 50, 14
GROUPBOX "Box", 2, 30 , 10, 150, 120 , BS_GROUPBOX | BS_LEFTTEXT
}

Frank Demont
 
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Postby Silvio » Wed Aug 23, 2006 1:13 pm

I have the same error :

I want made a dialog trasparent :

the group when traparent

the say control is trasparent but the get control where is ?

I want that the get control be no trasparent

How I can make it?

(test file at :http://hyperupload.com/download/02a8655f30/CWPOS.zip.html)
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Silvio » Thu Aug 24, 2006 5:02 pm

Frank,
I found the solution see at :http://fivetechsoft.com/forums/viewtopic.php?p=17627#17627

REgards,
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Carles, Google [Bot] and 46 guests

cron