Property | Datentyp(Read/Write) | Hinweise |
Left | Integer (R/W) | Linke Position |
Top | Integer (R/W) | Obere Position |
Width | Integer (R/W) | Weite |
Height | Integer (R/W) | Höhe |
ClientHeight | Integer (R) | Höhe des Clientbereiches |
ClientWidth | Integer (R) | Breite des Clientbereiches |
Visible | Integer (R/W) | TRUE = sichtbar (voreingestellt) ; FALSE = nicht sichtbar |
Enabled | Integer (R/W) | TRUE = aktiv (voreingestellt) ; FALSE = inaktiv |
Color | UInteger (R/W) | Hintergrundfarbe des Control und Containers ; voreingestellt ist hellgrau |
SelTabColor | UInteger (R/W) | Hintergrundfarbe des aktiven Tab ; voreingestellt ist hellgrau |
UnSelTabColor | UInteger (R/W) | Hintergrundfarbe nicht aktiven Tab ; voreingestellt ist weiß |
TextColor | UInteger (R/W) | Textfarbe des aktiven Tab ; voreingestellt ist schwarz |
UnSelTextColor | UInteger (R/W) | Textfarbe der nicht aktiven Tab ; voreingestellt ist grau |
CurTab | Integer (R/W) | Aktuell aktiven Tab |
TabCount | Integer (R) | Anzahl der Tab ( nur lesen ) |
TabHeight | Integer (R/W) | Höhe der Tab in Pixel. |
Handle | HWND (R) | Handle des Control (nur lesen !) |
Tip | String (W) | Der hier zugeordnete String wird als ToolTip angezeigt (auf allen Tab der gleiche Text) |
SUB | Argumente | Hinweis |
Create |
ByVal hParent As HWND, ByVal x As Integer,ByVal y As Integer,ByVal w As Integer,ByVal h As Integer ) |
Handle des Elternfenster Dimensionen x,y,Weite,Höhe |
addTab |
(TabCaption As String, ByVal ImgIndex As Integer ) |
Text des Tab Index des Bildes in der Imagelist oder -1 wen kein Bild |
SetImageList | (ByVal hImgList As HIMAGELIST ) | Handle der Imagelist |
Invalidate | keine | Veranlasst das senden einer WM_PAINT Botschaft |
Repaint | keine | Wie Invalidate aber mit Nicht-Clientbereich |
setFont | (Face As String, ByVal size As Integer, ByVal bold As Integer, ByVal italic As Integer, ByVal underlin As Integer) |
Schrift-Name Schriftgröße 1=bold,0=normal 1=italic,0=normal 1=underlin,0=normal |
Event SUB | Argumente | Hinweis |
onChange | (ByVal nTab As Integer) | nTab ist die aktive Tab ( Basis 0 ) |
onLButtondown | (ByVal x As Short, ByVal y As Short) | Wenn auf dem Control mit der linker Mousetaste geklickt wird x und y ist dabei die Position des Mousezeigers |
onRButtondown | (ByVal x As Short, ByVal y As Short) | Wenn auf dem Control mit der rechter Mousetaste geklickt wird x und y ist dabei die Position des Mousezeigers |
Beispiel: #Include "winFBgui.bi" Dim Shared As FForm form1 Dim Shared As FTabControl ttab1 Dim Shared As FPanel panel1,panel2,panel3 Dim Shared As FButton btn1 Dim Shared As FImageList Ptr img1 img1 = New FImageList Sub ttab1_Change( ByVal tbPos As Integer) Select Case tbPos ' Die Panele umschalten muss man selbst machen Case 0 panel1.Visible = TRUE panel2.Visible = FALSE panel3.Visible = FALSE Case 1 panel2.Visible = TRUE panel1.Visible = FALSE panel3.Visible = FALSE Case 2 panel3.Visible = TRUE panel2.Visible = FALSE panel1.Visible = FALSE End Select End Sub Sub btn1_Click form1.FormClose End Sub '-------------------------------------------------------------------- ' Form und Control '-------------------------------------------------------------------- form1.Create("Test 1",0,0,400,350) Form1.Center Form1.Color = &HEEFFBF ttab1.Create(form1.Handle,10,10,300,250) ttab1.Color = &HEEFFBF ' Hintergrund des Control und des Containers ttab1.onChange = @ttab1_Change ttab1.UnSelTextColor = BGR(180,180,180)' Textfarbe Unsel. Tab ttab1.addTab("Tabulator1",0) ' Tab hinzufügen mit Bild Imagelist Index 0 ttab1.addTab("Tabulator2",1) ' Tab hinzufügen mit Bild Imagelist Index 1 ttab1.addTab("Tabulator3",-1) ' Tab hinzufügen ohne Bild img1->Create(2,16,16) ' Imagelist Create 2 Bilder, 16px mal 16px img1->AddBMP("cneu.bmp") ' Bitmap dazu index 0 img1->AddBMP("cneu2.bmp") ' Bitmap dazu index 1 usw. ttab1.SetImageList(img1->Handle) ' ImageList dem TabControl hinzufügen '---------- Die Panels, die die gewünschten Steuerelemente Aufnehmen panel1.Create(ttab1.Handle,0, ttab1.TabHeight ,ttab1.ClientWidth , ttab1.ClientHeight - ttab1.TabHeight) panel1.Color = &HF8E8d8 panel1.Caption = " Das ist das Panel 1" panel2.Create(ttab1.Handle,1,ttab1.TabHeight ,296 ,223) panel2.Color = &HF8E8d8 panel2.Caption = " Das ist das Panel 2" panel2.Visible = FALSE panel3.Create(ttab1.Handle,1,ttab1.TabHeight ,296 ,223) panel3.Color = &HF8E8d8 panel3.Caption = " Das ist das Panel 3" panel3.Border = 1 panel3.Visible = FALSE ' Button zentrieren btn1.Create(form1.Handle,"Exit",Int((panel1.Width - 90)/2) ,270,90,30) btn1.Color = &HF8E8d8 btn1.onClick = @btn1_Click '------ Show entält MessageLoop - muss immer am Ende sein ------------ form1.Show Delete img1 ' Imagelist löschen ExitProcess(0) End |
So sieht es aus :![]() |