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

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

ControlsExDevice library

Reply
 
LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 05-23-2008, 08:51 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Cableguy View Post
since there is no "change Parent" available, it renders the control useless in some applications...
I assume you mean the DateTimePIcker control. The only ChangeParent I know is in the Formlib and it should work.

ChangeParent(DTP.ControlRef, "Panel1")

For library controls, like those in ControlEx, you need to use the ControlRef or Value property to refer to them for things like ChangeParent. From my FormEx help.

"In Basic4PPC a function that expects a Control object can receive a string (or any expression that evaluates to a string) with the name of a Basic4ppc control (Basic4ppc will convert it to the required reference) or a Control object (which can only come from an external library). "
Reply With Quote
  #22 (permalink)  
Old 05-23-2008, 03:34 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Quote:
Originally Posted by agraham View Post
I assume you mean the DateTimePIcker control. The only ChangeParent I know is in the Formlib and it should work.

ChangeParent(DTP.ControlRef, "Panel1")

For library controls, like those in ControlEx, you need to use the ControlRef or Value property to refer to them for things like ChangeParent. From my FormEx help.

"In Basic4PPC a function that expects a Control object can receive a string (or any expression that evaluates to a string) with the name of a Basic4ppc control (Basic4ppc will convert it to the required reference) or a Control object (which can only come from an external library). "
Thanks Andrew, still, using a second dll just because I need to change the parent is a nag....
Since we CAN, add it to a form, is it that much of a chnge to modify the dll in order to be able to change the parent, or to be able to add it to a Panel ( i still can see why it doesn't work as is...)
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #23 (permalink)  
Old 05-23-2008, 04:33 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Cableguy View Post
is it that much of a chnge to modify the dll in order to be able to change the parent, or to be able to add it to a Panel
I can't see much point as if you used any of the controls in ControlsEx you would also need to use Formlib to change their parent.

Quote:
i still can see why it doesn't work as is..
I assume that you mean "can't see why". To change the parent of a control .NET needs a refence to the new parent and to the control. For controls implemented within B4PPC both the name and the reference are known to B4PPC as it created the control. Because of this B4PPC can convert a string, such as "Button1" to an actual control reference. For controls from a library only the name is known to B4PPC as the reference to the control is held within the library, (created by New). Hence libraries implement a Value or ControlRef property that returns the control reference for use when it is needed.
Reply With Quote
  #24 (permalink)  
Old 05-23-2008, 04:57 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Thanks Andrew...


All is clear now...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #25 (permalink)  
Old 06-02-2008, 05:22 AM
Junior Member
 
Join Date: May 2008
Posts: 33
Default

Love the ability add a DatePicker, and even worked out how to use the other library to add it to a specific panel. Problem is... I can't work out a way to put the control somewhere specific in the tab order (I want to insert it after a specific control)

Also with the date picker... on the smartphone when editing a contact there is a neat control that only takes up a small amount of screen real-estate and has a checkbox... is there a way to format the ControlsEx date picker the same way?
Reply With Quote
  #26 (permalink)  
Old 06-02-2008, 10:27 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Offbeatmammal View Post
I can't work out a way to put the control somewhere specific in the tab order
Code:
' for a built-in control
 Obj1.FromControl( "ctlname"or Obj1.
 Obj1.SetProperty (
"TabIndex",  tabpos )
' for a library control
 Obj1.FromControl( ctl.ControlRef) or Obj1.value = ctl.ControlRef
 Obj1.SetProperty (
"TabIndex",  tabpos )
Obj1 is a Door library Object, tabpos 0 is first in tab order increasing after that. Note that if you don't set a unique TabIndex for all the tabbable controls on a form you may get some odd behaviour when tabbing through the controls due to duplicate TabIndex values.

Quote:
is there a way to format the ControlsEx date picker the same way?
I presume you mean the ControlsExDevice library not the ControlsEx library. Doesn't the ShowUpDown property do what you want?
Reply With Quote
  #27 (permalink)  
Old 06-02-2008, 07:03 PM
Junior Member
 
Join Date: May 2008
Posts: 33
Default

ShowUpDown doesn't seem to do anything on the Smartphone (but no drama), the custom "dd MMM yyyy" format did the trick for layout, though I can't find a setting to make the checkbox - guess that's some weird special case (I can fake it with two controls)

TabIndex I think I'll have to play with some more. I know the field that I want to place this one after so just need to see how I can get the tabindex of that one and go from there (more playing!)
Reply With Quote
  #28 (permalink)  
Old 06-16-2008, 11:46 PM
Standa's Avatar
Junior Member
 
Join Date: May 2007
Location: Czech Republic
Posts: 38
Send a message via MSN to Standa
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi,
I need program, which only shows notification, but it is possible only if Form is showed. When I do not use Form1.Show, notification is not displayed. Is it normal, or I am wrong?

Sample...
Code:
Sub App_Start
    notif.New1
    notif.Text=
"<a href=" & Chr(34) & "clicked" & Chr(34) & ">Close.</a>"
    notif.InitialDuration=
5
    notif.Visible=
True
End Sub

Sub notif_ResponseSubmitted
    notif.Visible=
False
End Sub
__________________
BlackBerry 8900, Dell Streak, SE MBW-150
Reply With Quote
  #29 (permalink)  
Old 06-17-2008, 05:24 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The program ends after sub App_Start if no form is shown.
You can use Hardware.ShowTodayScreen to minimize the form.
You can also set the form's text to "", so it will not show in the running tasks list.
Reply With Quote
  #30 (permalink)  
Old 06-17-2008, 08:32 AM
Standa's Avatar
Junior Member
 
Join Date: May 2007
Location: Czech Republic
Posts: 38
Send a message via MSN to Standa
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I have already tried hw.ShowTodayScreen, but it did not works. I forgot, that it must be outside of App_Start. Thanks.
__________________
BlackBerry 8900, Dell Streak, SE MBW-150
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
Door library (Beta) - Special library Erel Official Updates 60 01-13-2011 12:23 PM
Merging Outlook library and Phone library Erel Official Updates 11 09-15-2010 10:22 AM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 08:46 PM


All times are GMT. The time now is 03:14 AM.


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