|
-
Dec 7th, 2002, 09:30 PM
#1
TAB PAGES!!!! VS keeps rearranging them!
aah I'm getting crazy!!!! I have 7 tabpages in my tab control. I want to have them in a certain order. No mather what order I choose, VS changes the order at a random time, and to a random order!
For example I rearrange the tabs, but when I run the program all of the tabpages are in another random order. Sometimes this happens when I switch from code view to design view
this is the code that VS makes, I edited it manually and put it in the order that I want, but it still keeps changing this line 
VB Code:
Me.tabWizard.Controls.AddRange(New System.Windows.Forms.Control() {Me.tabpSelectPics, _
Me.tabpFormatImages, Me.tabpThumbnails, _
Me.tabpChooseFolders, Me.tabpPages, Me.tabpHtmlTemplate, _
Me.tabpImages})
any ideas?!!!!
Last edited by MrPolite; Dec 7th, 2002 at 09:36 PM.
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Dec 11th, 2002, 10:20 PM
#2
-
Dec 11th, 2002, 10:27 PM
#3
Lively Member
So lets see if I unserstand
You have TabControl1 and on this control you have 7 tabs with 7 corresponding tab pages, one per tab?
-
Dec 11th, 2002, 10:29 PM
#4
Originally posted by flog3941
So lets see if I unserstand
You have TabControl1 and on this control you have 7 tabs with 7 corresponding tab pages, one per tab?
umm tabpage = tab
so yeah a tab control with 7 tabs
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Dec 11th, 2002, 10:44 PM
#5
Lively Member
have you tried rearanging them in the tab pages collection editor?
-
Dec 11th, 2002, 10:59 PM
#6
Lively Member
-
Dec 11th, 2002, 11:51 PM
#7
Originally posted by flog3941
Did this work?
I've tried that MANY times. aint working. I mean sometimes it works fine. But at some random time it will eventually change the order
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Dec 12th, 2002, 10:25 AM
#8
Frenzied Member
This happened to me once, and I dont know how it resolved. I changed the order manually at design time, ran the program and then reorderd them, but i am not sure this is what resolved the problem. Maybe i am going to face the problem in future again.
-
Dec 12th, 2002, 10:56 AM
#9
Member
i had the same problem... i rearranged the tabs at designtime and since that action the tabs are in correct order. i thought that i had made a mistake but now i read that maybe this could be a bug
to arrange (add) the tabs at runtime you can do something like that:
[CODE]
Me.SuspendLayout()
Me.TabControl1.TabPages.Clear()
Me.TabControl1.TabPages.AddRange(New TabPage() {Me.tpBenutzer, _
Me.tpBerechtigungsprofil, _
Me.tpFavoriten, _
Me.tpBenutzerdaten, _
Me.tpDarstellungsoptionen, _
Me.tpÄnderungsnachweis})
Me.ResumeLayout()
-
Dec 12th, 2002, 11:06 PM
#10
Originally posted by escape0
i had the same problem... i rearranged the tabs at designtime and since that action the tabs are in correct order. i thought that i had made a mistake but now i read that maybe this could be a bug
to arrange (add) the tabs at runtime you can do something like that:
[CODE]
Me.SuspendLayout()
Me.TabControl1.TabPages.Clear()
Me.TabControl1.TabPages.AddRange(New TabPage() {Me.tpBenutzer, _
Me.tpBerechtigungsprofil, _
Me.tpFavoriten, _
Me.tpBenutzerdaten, _
Me.tpDarstellungsoptionen, _
Me.tpÄnderungsnachweis})
Me.ResumeLayout()
Glad to see that I wasn;t out of my mind, and someone else had actually this problem.
But the way you do it, you cant edit the tabs at runtime 
So I guess I have to deal with this, sight
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Apr 1st, 2003, 11:51 AM
#11
New Member
Did you ever resolve this. I had the same problem and I think I have worked around it using Add rather than AddRange as follows:
[CODE]
Dim intCount As Integer
Dim myTabPage() As Object
ReDim myTabPage(2)
For intCount = 0 To 2
myTabPage(intCount) = New TabPage()
TabControl1.TabPages.Add(myTabPage(intCount))
myTabPage(intCount).Text = "TabPage" & intCount
Next
-
Apr 1st, 2003, 04:47 PM
#12
no never resolved
the problem is that I'm using the designer to make the tab pages. VS rearranges the elements in the code.
I've found vs to be very very buggy. It's annoying as hell when you are working on a big project. Memory leaks, crashes, etc.
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Nov 27th, 2003, 01:22 PM
#13
Addicted Member
I've stumbled into this problem too. Anyone have a fix?
-
Nov 27th, 2003, 07:41 PM
#14
Lively Member
I've come across this as well and sadly there dosen't appear to be any way to solve this problem. I think if you use images on the tabs this may be the cause of it because if i just use text VS doesn't re-order them.
I'm using VS 2002 Pro by the way. Not sure if this has been solved in newer versions.
-
Nov 27th, 2003, 11:57 PM
#15
Originally posted by Wallabie I'm using VS 2002 Pro by the way. Not sure if this has been solved in newer versions.
No, many thanks to microsoft, it's still here with us. And hopefully, it will remain with us
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Nov 28th, 2003, 01:16 AM
#16
Frenzied Member
has anyone checked the microsoft knowledge base?
-
Nov 29th, 2003, 01:42 AM
#17
New Member
I am struggling with the same problem.
Will it still change ig you change the taborder in runtime?
-
Nov 29th, 2003, 03:14 AM
#18
Frenzied Member
Originally posted by thephantom
has anyone checked the microsoft knowledge base?
I have checked, no definite answer. Some have come to the resoltion similar to what I mentioned earlier in this thread. Reorder the tabs at desgin time in the wrong order that appears at run time. Save, build, run and reorder them again to the order you like, save, build.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Nov 30th, 2003, 09:05 AM
#19
I wonder how many charact
Building on the Add method, which you said you couldn't use because you want to edit the tabpages at run time. You may want to investigate another solution.
side note: The tabpages in my company's app are actually form classes. And we simply add the forms to the tabcontrol in the correct order, and they stay that way, simply because we add them at run-time. But we use a 3rd party TabControl that can add forms and makes them look like tabpages.. DotNetMagic. You can google for them, its a pretty ok control too. But if you don't want to use it (costs $).......
Here's a way to add 'forms' to .Net tabcontrols, allowing you to create the tabpages using the Forms designer, and then add them at runtime in the order you wish:
1) Add a new class item, after the class name, type:
Inherits System.Windows.Forms.Form
You should be able to switch to designer mode and layout the 'tabpage' as you wish.
When you are done laying out the form:
2) Switch Inherits Windows.Forms.Form to Inherits
Windows.Forms.TabPage.
3) You will need to erase the autoscalebasesize line that the designer generated when it was a Form (build it, it will point out the error to you).
4) You also need to add this to your class:
VB Code:
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
Now... to test it out.
You can simply write some code like the following
under a button click:
VB Code:
Dim x As New mytabpage()
x.Text = "1"
Me.TabControl1.Controls.Add(x)
Dim r As New mytabpage()
r.Text = "2"
Me.TabControl1.Controls.Add(r)
If you want a reference to the tabpage, you can
assign different variable names to each page, or
if that's not required, you can simply keep saying
VB Code:
x = New MyTabPage
x.Text="1"
Me.TabControl1.Controls.Add(x)
x = New MyTabPage
x.Text="2"
Me.TabControl1.Controls.Add(x)
In your app, Each tabpageForm class has its own purpose (ascertained by the names you were calling them). You can simply declare variable references at your main Form level, and set them = new mydigitalimagetabpage ... etc.
This way you can dynamically add the tabpages at runtime in the
order you wish.
Last edited by nemaroller; Nov 30th, 2003 at 09:42 AM.
-
Dec 4th, 2003, 04:40 PM
#20
Definitly a bug...
Hi.
This is definitly a bug.
I have experinced this many times.
No matter how often I rearranged the tabs to the order I wanted
the IDE kept rearranging them in random order at random times.
Eventually, I ended up with clearing the tabs in the Form_Load event, and then adding them in the order i wanted.
Buggy, but effective.
Hope it helps.
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
Dec 4th, 2003, 10:04 PM
#21
I also experienced this. I would create several tabs and in a certain order, only to have the order changed when it was built.
It did this on the same project on my laptop and desktop so it is definatly a bug in VS. To fix mine, I deleted all tabs, saved, closed and then re-did the tabs on my desktop (deleted them on laptop) and it seemed to fix itself.
It wouldn't work if I deleted and re-created them on the same PC.
-
Dec 4th, 2003, 10:43 PM
#22
Sleep mode
I'm having the same problem in C# . To me , it seems a bug . I just got used to rearange them again . It's not a big deal anyways .
-
Feb 7th, 2006, 04:06 PM
#23
Lively Member
Re: TAB PAGES!!!! VS keeps rearranging them!
I've struggled with the same problem for about a year, and it has steadily gotten worse even though my tab control only has six pages.
I gave up the ghost and now solve the issue at runtime. In my form load, I remove all the pages from TabPages in a For/Step/Next loop, and then I add them back in the desired order.
Since doing that, I have not experienced a reordering problem at runtime. The only downside to this workaround, beyond the 0.0001 seconds of extra runtime this takes on startup, is that while you are working in Visual Studio, the pages are in whatever random order that VB puts them in. That takes a little getting used to, but I don't even really notice it anymore.
-
Feb 7th, 2006, 04:17 PM
#24
Re: TAB PAGES!!!! VS keeps rearranging them!
Wow, this thread is over 2 years old. I was wondering why I had a new reply in it. Heh.
-
Feb 7th, 2006, 04:28 PM
#25
Lively Member
Re: TAB PAGES!!!! VS keeps rearranging them!
Eh...I remember researching this a year ago and finding this thread. I figured that since 99% of the time I'm posting questions, I figured it would be a good idea to go back and post an answer for a change.
-
Feb 9th, 2006, 12:02 AM
#26
Re: TAB PAGES!!!! VS keeps rearranging them!
are you using VS2005? wondering if this is fixed in the new VS
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Feb 9th, 2006, 07:07 AM
#27
Lively Member
Re: TAB PAGES!!!! VS keeps rearranging them!
Don't know...haven't gone to 2005 yet. Sorry.
Check with me again, oh...in about two years.
-
Feb 9th, 2006, 08:21 AM
#28
Re: TAB PAGES!!!! VS keeps rearranging them!
i had the same problem in 2003 however i have a couple of tabcontrols in the new IDE and i haven't had the problem since
-
Feb 9th, 2006, 08:53 PM
#29
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
|