FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour search for TTabControl() Sample
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: search for TTabControl() Sample
Posted: Sat Oct 29, 2022 09:45 PM

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

greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: search for TTabControl() Sample
Posted: Sat Oct 29, 2022 09:46 PM
hi Antonio,

thx for Sample

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

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: search for TTabControl() Sample
Posted: Sat Oct 29, 2022 09:46 PM

hi Marc,

thx for Answer.

i got a working Solution

greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: search for TTabControl() Sample
Posted: Sat Oct 29, 2022 09:51 PM
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++
greeting,

Jimmy
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: search for TTabControl() Sample
Posted: Sat Oct 29, 2022 11:23 PM
Please read TFolder():New() and TPages():New() methods. You will find:
Code (fw): Select all Collapse
         ::Create( "SysTabControl32" )
That means both these controls are created using Windows' SysTabControl32()
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: search for TTabControl() Sample
Posted: Sat Oct 29, 2022 11:38 PM
Question : what is the Difference "oTabs OF oMain" vs. "oMain:oClient = oTabs" :?:
Code (fw): Select all Collapse
@ 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 (fw): Select all Collapse
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.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: search for TTabControl() Sample
Posted: Sun Oct 30, 2022 05:17 AM
hi,
nageswaragunupudi wrote:
Code (fw): Select all Collapse
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
greeting,

Jimmy
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: search for TTabControl() Sample
Posted: Sun Oct 30, 2022 07:56 AM
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 (fw): Select all Collapse
#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
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: search for TTabControl() Sample
Posted: Sun Oct 30, 2022 10:13 AM
hi Enrico,

i "see"
change {} to {""} and
Code (fw): Select all Collapse
   oTabs:DelItemPos( 1 )
---

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

Jimmy

Continue the discussion