Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Error when moving treeview to a tabcontrol

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-14-2007, 09:42 PM
Peter's Avatar
Junior Member
 
Join Date: May 2007
Location: The Netherlands
Posts: 18
Default Error when moving treeview to a tabcontrol

I'm trying to move a treeview control to a tab page.
Basic4PPC responds with the error message : Unable to cast object of type 'Dbasic.Other.SwrapObject' to type 'System.Windows.Forms.Control'

Am I doing something wrong?

Code:
Sub App_Start

    Form1.Show
    
sip(true)
    AddLabel (form1,
"Label2"556020"Option:")
    AddTextBox (Form1,
"TextBox1",40,20,100,25,"")
    tbc.New1 (
"Form1", -5,0245280)
        tbc.AddTabPage(
"Aantallen")    
          tbc.AddTabPage(
"Hoorspel")
           tbc.AddTabPage(
"Personen")
        tbc.AddTabPage(
"Zoeken")
        tbc.AddTabPage(
"Lijsten")
        tbc.AddTabPage(
"X")
        tbc.AddTabPage(
"Z")
        tbc.AddTabPage(
"Configuratie")
        
'tbc.AddControl("label1",0,20,20)
        tbc.AddControl("label2",0,20,60)        
    Con.New1
    Reader.New1
    tv.New1(
"Form1"55, Form1.Width - 10, Form1.Height - 10)    
    Node.New1
    <font color=
"Red">tbc.AddControl("tv",1,20,20)</font>
    Cmd.New1(
"",con.Value)
    Con.Open(
"Data Source = " & AppPath & "\DNH4ppc.sl3")

End Sub
__________________
PC : P4 3gHz, 2GiB
PPC : LOOX 500 + 1 GiB SD
---------------------------------------------------
(Reminder to self: )
Reply With Quote
  #2 (permalink)  
Old 05-15-2007, 06:42 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The right syntax is:
tbc.AddControl(tv.Control,1,20,20)

This is different than regular controls because TreeView is not a built-in control.
Reply With Quote
  #3 (permalink)  
Old 05-15-2007, 07:36 AM
Peter's Avatar
Junior Member
 
Join Date: May 2007
Location: The Netherlands
Posts: 18
Default

Thank you, Erel, that works.

Could i have found that in one of the help-files?

Peter
__________________
PC : P4 3gHz, 2GiB
PPC : LOOX 500 + 1 GiB SD
---------------------------------------------------
(Reminder to self: )
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create sprite/ moving figures? Stellaferox Questions (Windows Mobile) 14 12-31-2008 09:30 AM
Drawing and moving a Character Transparently (Not a Sprite) Drewpeu Questions (Windows Mobile) 2 10-08-2008 04:15 PM
Diff GPS values without moving GPS mouse Georg Questions (Windows Mobile) 1 04-22-2008 07:58 AM
VGA + TabControl Elrick Questions (Windows Mobile) 10 04-16-2008 02:25 PM
moving a sprite? colin9876 Questions (Windows Mobile) 7 11-27-2007 05:10 PM


All times are GMT. The time now is 05:01 AM.


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