Page 2 of 2

Re: search for TTabControl() Sample

PostPosted: Sat Oct 29, 2022 9:45 pm
by Jimmy
hi Enrico,

please use Sample "as it is" without "modification" to get "Problem" which i got.

what i have "comment out" are (working) Solution i found

Re: search for TTabControl() Sample

PostPosted: Sat Oct 29, 2022 9:46 pm
by Jimmy
hi Antonio,

thx for Sample

Question : what is the Difference "oTabs OF oMain" vs. "oMain:oClient = oTabs" :?:

Re: search for TTabControl() Sample

PostPosted: Sat Oct 29, 2022 9:46 pm
by Jimmy
hi Marc,

thx for Answer.

i got a working Solution

Re: search for TTabControl() Sample

PostPosted: Sat Oct 29, 2022 9:51 pm
by Jimmy
hi,

thx for Answer.

i have search in Source for "TTabControl32" ... there is no File include it :?
than i have search for "TTabControl" and it is only in "that" CLASS

"SysTabControl32" is used in
c:\fwh\source\classes\folder.prg
c:\fwh\source\classes\tpages.prg

c:\fwh\source\classes\ttabctrl.prg
c:\fwh\source\classes\window.prg

but i can´t "see" that TFolder() or TPages() use CLASS TTabControl()

---

p.s.
as i want to use CODE for different xBase Dialect i use "Original" Windows Control only.
CLASS TFOLDEREX() is very nice but i´m not sure that i can use Concept with HMG or Xbase++

Re: search for TTabControl() Sample

PostPosted: Sat Oct 29, 2022 11:23 pm
by nageswaragunupudi
Please read TFolder():New() and TPages():New() methods. You will find:
Code: Select all  Expand view
        ::Create( "SysTabControl32" )
 

That means both these controls are created using Windows' SysTabControl32()

Re: search for TTabControl() Sample

PostPosted: Sat Oct 29, 2022 11:38 pm
by nageswaragunupudi
Question : what is the Difference "oTabs OF oMain" vs. "oMain:oClient = oTabs" :?:


Code: Select all  Expand view
@ r,c TABS oTabs OF oWnd <otherClause>

oTabs is created as one of the controls inside oWnd.
oWnd is the Parent of oTabs.
oTabs is one the memebers of oWnd:aControls

Code: Select all  Expand view
oWnd:oClient := oBrw

oBrw occupies the entire client area of oWnd. When oWnd is resized, oBrw also is resized to fit inside the Parent window's client area.

Re: search for TTabControl() Sample

PostPosted: Sun Oct 30, 2022 5:17 am
by Jimmy
hi,
nageswaragunupudi wrote:
Code: Select all  Expand view
oWnd:oClient := oBrw

oBrw occupies the entire client area of oWnd. When oWnd is resized, oBrw also is resized to fit inside the Parent window's client area.

aah, now i understand :idea: , thx

Re: search for TTabControl() Sample

PostPosted: Sun Oct 30, 2022 7:56 am
by Enrico Maria Giordano
Jimmy wrote:hi Enrico,

please use Sample "as it is" without "modification" to get "Problem" which i got.

what i have "comment out" are (working) Solution i found


You are right. There has to be a bug in folder.prg. This is a workaroud:

Code: Select all  Expand view
#include "FiveWin.ch"
MEMVAR oMain, oTabs, oStatusBar

PROCEDURE Main()
LOCAL nHeight   := 1024
LOCAL nWidth    := 1280

PRIVATE oMain, oTabs, oStatusBar

   DEFINE WINDOW oMain FROM  0,0 TO nWidth, nHeight PIXEL TITLE "FiveWin TGrid Listview Demo "

* #define working
#IFDEF working
   oTabs := TFolder():New( 3, 3,{"no_1"} , , oMain, 1, , , .t.,;
                          .f., oMain:nRight - oMain:nLeft, oMain:nBottom - oMain:nTop )
#ELSE
   oTabs := TFolder():New( 3, 3,{""} , , oMain, 1, , , .t.,;
                          .f., oMain:nRight - oMain:nLeft, oMain:nBottom - oMain:nTop )
   oTabs:DelItemPos( 1 )
   oTabs:AddItem("Grid_1")
*  oTabs:AddItem("Grid_2")
#ENDIF

   oTabs:SetOption( 1 )

   @ 20, 10 BUTTON "blabla" SIZE 300,200 OF oTabs:aDialogs[ 1 ] PIXEL ACTION MsgInfo("blabla")

      DEFINE STATUSBAR oStatusBar PROMPT "Hello World " OF oMain SIZES nWidth - 100 CLOCK

   ACTIVATE WINDOW oMain CENTER

RETURN

Re: search for TTabControl() Sample

PostPosted: Sun Oct 30, 2022 10:13 am
by Jimmy
hi Enrico,

i "see"
change {} to {""} and
Code: Select all  Expand view
  oTabs:DelItemPos( 1 )


---

it would be nice when it could be fixed in CLASS TFolder()