|
-
Nov 18th, 2001, 12:15 AM
#1
Place a container for each RTF box on each Tab of the SSTab control, i.e. a Picturebox, then use code similar to the following:
VB Code:
Private Sub Form_Load()
Dim lCount As Long
For lCount = 0 To 6
If lCount > 0 Then Load rtfRTFs(lCount)
With rtfRTFs(lCount)
Set .Container = picContainers(lCount)
With picContainers(lCount)
.Move 12, SSTab1.TabHeight + 12, SSTab1.Width - 24, SSTab1.Height - SSTab1.TabHeight - 24
.BorderStyle = vbBSNone
End With
.Move 0, 0, picContainers(lCount).ScaleWidth, picContainers(lCount).ScaleHeight
.Text = "Tab" & lCount + 1
.Visible = True
End With
Next
End Sub
-
Nov 18th, 2001, 12:34 AM
#2
Member
Thanks Aaron,
The RichTextBox controls are not to be added all at the same time, but one after the other. Here's the complete scenario:
I have a MDI application with 5 instances of FORM1 as child forms dynamically loaded at start-up. FORM1 has a Tabstrip control (SSTab1) which holds or contains a richtextbox control. Clicking on a node of a TreeView control on another form should dynalically load a file onto the richtextbox control. Subsequent clicks to the nodes of the TreeView control should load or add new tabs to the SSTab1 control, load new instances of the RichTextBox1 control and load the files unto the active Tab.
A maximum of 7 Tabs can be added to the SSTab control on any instance of FORM1.
The user needs to be given an option to open or create a new instance of FORM1 when the maximum number of Tabs on the SStTab control has been reached in the active child form, or close a Tab there in order to add a new one.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|