|
-
May 3rd, 2000, 03:14 PM
#1
Thread Starter
Addicted Member
Hello!
I've got a problem with control arrays. If I at design-time create a control, such as a textbox and call it Text(0), and then at runtime use Load Text(i), where i = 1, 2, 3 or anything else, the loaded textboxes doesn't show. I can call them, load text into them etc. without error messages, but I can't see them.
They are not behind Text(0), because when I set
Text(0).Visible to False the form goes blank, without any textboxes. If I set Text(0).Visible to True again Text(0) appears, but I can't get Text(1), text(2) or anyone else to appear.
The same thing happens when I tried to load a lot of lines, on slightly different places. The first one appeared, but none of the following.
What can I do? I have tries the Visible property, SetFocus and other things.
Please, help me!
Pentax
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
-
May 3rd, 2000, 03:34 PM
#2
Fanatic Member
You have to set the visible properties of the new text boxes to true. They also load at the same position so try changing the Top property.
Code:
Text(1).Visible = True
Text(1).Top = Text(0).Top + 400
Text(2).Visible = True
Text(2).Top = Text(0).Top + 800
Iain, thats with an i by the way!
-
May 3rd, 2000, 03:48 PM
#3
Hyperactive Member
try this........
In addition to what Lain said, u can also set the Left property.
maybe u can use,
Text(1).Visible = True
Text(1).Left = Text(0).Left + Text(1).Width
Text(2).Visible = True
Text(2).Left = Text(1).Left + Text(2).Width
-
May 3rd, 2000, 04:08 PM
#4
Conquistador
if you do not set the properties of the new controls at the time of creation, the are an exact replica of the text box array in which they were created by, therefore making them the front text box
-
May 3rd, 2000, 04:52 PM
#5
transcendental analytic
This is the most common type of thread i've found on this forum: A newbie qwestion and then tons of answers to it. Just because there's noone that really knows what the problem is, but can solve it in their own way.
If I set Text(0).Visible to True again Text(0) appears, but I can't get Text(1), text(2) or anyone else to appear.
They appear behind the original, because as David said, they have the same properties as the original. You can use the move method to move the control. Also use Text(text.count-1) instead of text(1) or text(2) if you use your textbox dynamically
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 3rd, 2000, 05:00 PM
#6
Fanatic Member
Just for future reference.
Just for future reference. The name is Iain17. That is an "i" at the start not an "L". Who ever heard of someone called Lain!
No offence to all the Lain's out there.
Iain, thats with an i by the way!
-
May 3rd, 2000, 05:21 PM
#7
Thread Starter
Addicted Member
Well, thanks for trying, but I have already tried setting visible property to true, I have moved them around, I have hidden the original text box, and nothing happens.
I think it's something deeper then the ordinary misstakes.
Pentax
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
-
May 3rd, 2000, 07:55 PM
#8
transcendental analytic
I suggest you shoud post your code, or better than that, the whole form so that we can look at the properties
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 3rd, 2000, 11:51 PM
#9
Thread Starter
Addicted Member
Code posted
OK, here it comes.
In the form i have a Tabstrip called TabStrip1.
The textbox (called Text(1)) is of the same size and lies on the tabstrip.
I have a commandbutton called CmdNew, with which I create new textfiles (and tabs on the tabstrip).
Code:
Private Sub CmdNew_Click()
i = Text.Count
TabStrip1.Tabs.Add
Load Text(i + 1)
End Sub
Private Sub Form_Load()
End Sub
Private Sub TabStrip1_Click() 'Choose what textbox to show
For i = 1 To TabStrip1.Tabs.Count
If i = TabStrip1.SelectedItem.Index Then
'When the choosen number comes up, show that textbox
Text(i).Visible = True
Text(i).Text = "Number " & i
Text(i).SetFocus
Text(i).Left = 210
Text(i).Top = 630
Text(i).Width = 5265
Text(i).Height = 4740
Else: 'Hide the not choosen textboxes.
Text(i).Visible = False
End If
Next i
End Sub
Please, try it and help me. I' think I'm getting desperate soon...
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
-
May 4th, 2000, 01:11 AM
#10
transcendental analytic
Ok, and here comes the solution:
put this one in you list of text(i)...
Also, i suppose you could use with instead of repeating that text(i)
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 4th, 2000, 05:16 PM
#11
Thread Starter
Addicted Member
Thanks
Well, I'll try.
Thanks for helping!
Pentax
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
-
May 4th, 2000, 07:14 PM
#12
Conquistador
i have answered this exact question, check out my profile,
search for other posts by me, and look for something like tab strip or dynamically add
oh well, i could work it out again if worse comes to worse 
-
May 5th, 2000, 04:14 AM
#13
Thread Starter
Addicted Member
Well, XOrder helped grat.
Thanks to you all, I could never find that one out myself!
Pentax
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
-
May 5th, 2000, 10:04 AM
#14
Conquistador
what does Xorder do exactly?
-
May 5th, 2000, 05:25 PM
#15
Thread Starter
Addicted Member
Oops, sorry!
It was meant to be ZOrder, with zed.
It moves controls forwards or backwards on the form.
Pentax
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
-
May 5th, 2000, 05:39 PM
#16
transcendental analytic
It's like setwindowpos inside your app
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 6th, 2000, 01:17 PM
#17
Conquistador
why can't u just use top and left ?
-
May 6th, 2000, 05:55 PM
#18
transcendental analytic
Well, david we're talking about having a tablist were the textbox are overlapping each other. With Zorder you can put which one on top or on bottom
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 6th, 2000, 07:05 PM
#19
Conquistador
ok, sorry,
how come you get so many replies kedaman?
-
May 6th, 2000, 08:18 PM
#20
transcendental analytic
This time, it's because there's people like you are jumping around me
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|