search for TTabControl() Sample

User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: search for TTabControl() Sample

Post 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
greeting,
Jimmy
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: search for TTabControl() Sample

Post by Jimmy »

hi Antonio,

thx for Sample

Question : what is the Difference "oTabs OF oMain" vs. "oMain:oClient = oTabs" :?:
greeting,
Jimmy
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: search for TTabControl() Sample

Post by Jimmy »

hi Marc,

thx for Answer.

i got a working Solution
greeting,
Jimmy
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: search for TTabControl() Sample

Post 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++
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: search for TTabControl() Sample

Post by nageswaragunupudi »

Please read TFolder():New() and TPages():New() methods. You will find:

Code: Select all | Expand

         ::Create( "SysTabControl32" )
 
That means both these controls are created using Windows' SysTabControl32()
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: search for TTabControl() Sample

Post by nageswaragunupudi »

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

Code: Select all | Expand

@ 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

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
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: search for TTabControl() Sample

Post by Jimmy »

hi,
nageswaragunupudi wrote:

Code: Select all | Expand

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
User avatar
Enrico Maria Giordano
Posts: 8766
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 5 times
Contact:

Re: search for TTabControl() Sample

Post 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

#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
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: search for TTabControl() Sample

Post by Jimmy »

hi Enrico,

i "see"
change {} to {""} and

Code: Select all | Expand

   oTabs:DelItemPos( 1 )
---

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