search for TTabControl() Sample

Re: search for TTabControl() Sample

Postby Jimmy » Sat Oct 29, 2022 9: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
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: search for TTabControl() Sample

Postby Jimmy » Sat Oct 29, 2022 9:46 pm

hi Antonio,

thx for Sample

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

Re: search for TTabControl() Sample

Postby Jimmy » Sat Oct 29, 2022 9:46 pm

hi Marc,

thx for Answer.

i got a working Solution
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: search for TTabControl() Sample

Postby Jimmy » Sat Oct 29, 2022 9: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
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: search for TTabControl() Sample

Postby nageswaragunupudi » Sat Oct 29, 2022 11:23 pm

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()
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: search for TTabControl() Sample

Postby nageswaragunupudi » Sat Oct 29, 2022 11:38 pm

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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: search for TTabControl() Sample

Postby Jimmy » Sun Oct 30, 2022 5:17 am

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
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: search for TTabControl() Sample

Postby Enrico Maria Giordano » Sun Oct 30, 2022 7: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: 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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: search for TTabControl() Sample

Postby Jimmy » Sun Oct 30, 2022 10:13 am

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()
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 81 guests