Página 1 de 1
TFolder bug?
Publicado: Vie Ene 20, 2006 6:11 pm
por Ingo Junge-Herrmann
Hi,
I draw a folder and want that it shows the tabs with a identical width of
80 pt.
Here the code:
WITH OBJECT ::oFold := TFolder():New( ::oPanel1 )
:SetBounds( 4, 68, 646, 342 )
WITH OBJECT ::oFolderPage1 := TFolderPage():New( ::oFold )
:cText := "&Mandant"
:Create()
END
WITH OBJECT ::oFolderPage2 := TFolderPage():New( ::oFold )
:cText := "&Gegner"
:Create()
END
WITH OBJECT ::oFolderPage3 := TFolderPage():New( ::oFold )
:cText := "Ge&richt"
:Create()
END
WITH OBJECT ::oFolderPage4 := TFolderPage():New( ::oFold )
:cText := "&Aktenkonto"
:Create()
END
WITH OBJECT ::oFolderPage5 := TFolderPage():New( ::oFold )
:cText := "F&ord./Kosten"
:Create()
END
WITH OBJECT ::oFolderPage6 := TFolderPage():New( ::oFold )
:cText := "&Text"
:Create()
END
WITH OBJECT ::oFolderPage7 := TFolderPage():New( ::oFold )
:cText := "&Dok-Register"
:Create()
END
WITH OBJECT ::oFolderPage8 := TFolderPage():New( ::oFold )
:cText := "&Zeiten"
:Create()
END
:nIndex := 1
:lRightJustify := .T.
:lFixedWidth := .T.
:nMinTabWidth := 80
:Create()
END
In the IDE it is shown correctly (see folder1.bmp) but when the app runs
it looks like on the picture folder2.bmp.
Regards
Ingo
--
Attached files Folder.zip (21.6 KB)Â
TFolder bug?
Publicado: Sab Ene 21, 2006 8:57 pm
por jfgimenez
Ingo,
from the help file:
TTabCtrl:lFixedWidth
If it is .T., the tabs will have a fixed width. This style is not compatible
with the lRightJustify property.
--
Regards,
Jose F. Gimenez
TFolder bug?
Publicado: Sab Ene 21, 2006 8:57 pm
por jfgimenez
Ingo,
from the help file:
TTabCtrl:lFixedWidth
If it is .T., the tabs will have a fixed width. This style is not compatible
with the lRightJustify property.
--
Regards,
Jose F. Gimenez
TFolder bug?
Publicado: Dom Ene 22, 2006 8:57 am
por Ingo Junge-Herrmann
Jose,
>
>from the help file:
>
>
>TTabCtrl:lFixedWidth
>
>If it is .T., the tabs will have a fixed width. This style is not compatible
>with the lRightJustify property.
>
Yes I know, but when lRightJustify is .F. the tabwidth are too wide. When
lRightJustify is .T. it looks good on the IDE but not in the running app.
What to do? Is there any possibility to assign the width of the tab itself?
Regards
Ingo
TFolder bug?
Publicado: Dom Ene 22, 2006 8:57 am
por Ingo Junge-Herrmann
Jose,
>
>from the help file:
>
>
>TTabCtrl:lFixedWidth
>
>If it is .T., the tabs will have a fixed width. This style is not compatible
>with the lRightJustify property.
>
Yes I know, but when lRightJustify is .F. the tabwidth are too wide. When
lRightJustify is .T. it looks good on the IDE but not in the running app.
What to do? Is there any possibility to assign the width of the tab itself?
Regards
Ingo
TFolder bug?
Publicado: Dom Ene 22, 2006 1:18 pm
por jfgimenez
Ingo,
> What to do? Is there any possibility to assign the width of the tab
> itself?
Actually, there is no property to do it, sorry. However, there is a way...
put this code into the folder's OnCreate event:
METHOD Folder1Create( oSender ) CLASS TForm1
oSender:SendMsg( TCM_SETITEMSIZE, 0, 80 )
RETURN Nil
and "include" the header file "comctrl.api" at the beginning of the module,
just after "xailer.ch":
#include "Xailer.ch"
#include "Commctrl.api"
--
Regards,
Jose F. Gimenez
TFolder bug?
Publicado: Dom Ene 22, 2006 1:18 pm
por jfgimenez
Ingo,
> What to do? Is there any possibility to assign the width of the tab
> itself?
Actually, there is no property to do it, sorry. However, there is a way...
put this code into the folder's OnCreate event:
METHOD Folder1Create( oSender ) CLASS TForm1
oSender:SendMsg( TCM_SETITEMSIZE, 0, 80 )
RETURN Nil
and "include" the header file "comctrl.api" at the beginning of the module,
just after "xailer.ch":
#include "Xailer.ch"
#include "Commctrl.api"
--
Regards,
Jose F. Gimenez
TFolder bug?
Publicado: Dom Ene 22, 2006 5:53 pm
por Ingo Junge-Herrmann
>Actually, there is no property to do it, sorry. However, there is a way...
>put this code into the folder's OnCreate event:
>
> METHOD Folder1Create( oSender ) CLASS TForm1
> oSender:SendMsg( TCM_SETITEMSIZE, 0, 80 )
> RETURN Nil
>
>and "include" the header file "comctrl.api" at the beginning of the module,
>just after "xailer.ch":
>
> #include "Xailer.ch"
> #include "Commctrl.api"
Jose,
wich importance has the property nMinTabWidth?
The help file says: "Indicates the minimum control tab width".
Why I can not do it this way?
Regards
Ingo
TFolder bug?
Publicado: Dom Ene 22, 2006 5:53 pm
por Ingo Junge-Herrmann
>Actually, there is no property to do it, sorry. However, there is a way...
>put this code into the folder's OnCreate event:
>
> METHOD Folder1Create( oSender ) CLASS TForm1
> oSender:SendMsg( TCM_SETITEMSIZE, 0, 80 )
> RETURN Nil
>
>and "include" the header file "comctrl.api" at the beginning of the module,
>just after "xailer.ch":
>
> #include "Xailer.ch"
> #include "Commctrl.api"
Jose,
wich importance has the property nMinTabWidth?
The help file says: "Indicates the minimum control tab width".
Why I can not do it this way?
Regards
Ingo
TFolder bug?
Publicado: Dom Ene 22, 2006 6:32 pm
por jfgimenez
Ingo,
> wich importance has the property nMinTabWidth?
> The help file says: "Indicates the minimum control tab width".
> Why I can not do it this way?
nMinTabWidth can be used only if nFixedWidth is .F.
ITOH, there was a bug with nMinTabWidth (now it's fixed), and it is ignored
when the folder is created. But you can set it in the OnCreate event
(instead of the previous tip):
METHOD Folder1Create( oSender ) CLASS TForm1
oSender:nMinTabWidth := 80
RETURN Nil
--
Regards,
Jose F. Gimenez
TFolder bug?
Publicado: Dom Ene 22, 2006 6:32 pm
por jfgimenez
Ingo,
> wich importance has the property nMinTabWidth?
> The help file says: "Indicates the minimum control tab width".
> Why I can not do it this way?
nMinTabWidth can be used only if nFixedWidth is .F.
ITOH, there was a bug with nMinTabWidth (now it's fixed), and it is ignored
when the folder is created. But you can set it in the OnCreate event
(instead of the previous tip):
METHOD Folder1Create( oSender ) CLASS TForm1
oSender:nMinTabWidth := 80
RETURN Nil
--
Regards,
Jose F. Gimenez