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). "
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
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.
__________________
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
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?
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?
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!)
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
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.