Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Problem Adding panel in tabpages to multiple Forms


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-23-2008, 08:44 AM
Senior Member
 
Join Date: Mar 2008
Location: Dhaka, Bangladesh
Posts: 153
Default Problem Adding panel in tabpages to multiple Forms

Hi all,
I’ve added tabpages to 1st Form and panels (to house controls like- combo box, text box etc.) to each of the tabpages Like:

'Adding Tab pages to the Form2
tbc.New1("form2",2,10,230,250)
tbc.AddTabPage("Geo Info.")
tbc.AddTabPage("House Hold Info.")
tbc.AddTabPage("Water & Sanitation")
tbc.AddControl("panel1",0,0,0)'panel for Tabpage Geo info.
tbc.AddControl("panel2",1,0,0)'panel for Tabpage House Hold Info.
tbc.AddControl("panel3",2,0,0)'panel for Tabpage Water & Sanitation

Now I want to add tabpages to another From and panels as well to each of the tabpages like above.

'Adding Tab pages to the Form3
tbc.New1("form3",2,10,230,250)
tbc.AddTabPage ("1st page")
tbc.AddTabPage ("2nd page")
tbc.AddTabPage ("3rd page")

up to this point no-problem. But problem starts when I tried to add panel to the 1st tabpage, like:

tbc.New1("form3",2,10,230,250)
tbc.AddTabPage ("1st page")
tbc.AddTabPage ("2nd page")
tbc.AddTabPage ("3rd page")
tbc.AddControl("panel4",0,0,0)

I guess, the syntax is not correct as it conflict with the 1st tabpage of the 1st Form. And the error message is:

Error occurred on Sub app_start.
Line number : xx
Tbc.Addcontrol(“panel4”,0.0,0)
Error description:
Unable to cast object of type ‘System.Int32’ to type ‘System.windows.Form.Control’.
Continue?

Need help.

Regards,
Reply With Quote
  #2 (permalink)  
Old 04-23-2008, 10:21 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 4,870
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You should create a different object for each TabControl used.
Instead of using tbc again you should choose Tools - Add Object - TabControl and create a new tab control.
Reply With Quote
  #3 (permalink)  
Old 04-28-2008, 09:49 AM
Senior Member
 
Join Date: Mar 2008
Location: Dhaka, Bangladesh
Posts: 153
Default

Thank you.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding calendar in runtime Cableguy Basic4ppc Wishlist 2 05-23-2008 05:23 PM
Adding time Sascha K. Questions & Help Needed 3 03-23-2008 07:46 PM
Sorted objects when adding agraham Basic4ppc Wishlist 0 11-18-2007 03:47 PM
Adding a Icon to a Control. cdeane Questions & Help Needed 1 09-29-2007 05:56 AM
Multiple forms and form importing scott93727 Basic4ppc Wishlist 3 05-08-2007 01:36 PM


All times are GMT. The time now is 09:59 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0