ControlsExDevice library

agraham

Expert
Licensed User
Longtime User
since there is no "change Parent" available, it renders the control useless in some applications...
:confused: 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). "
 

Cableguy

Expert
Licensed User
Longtime User
:confused: 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...)
 

agraham

Expert
Licensed User
Longtime User
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.

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.
 

Cableguy

Expert
Licensed User
Longtime User
Thanks Andrew...


All is clear now...
 

Offbeatmammal

Member
Licensed User
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?
 

agraham

Expert
Licensed User
Longtime User
I can't work out a way to put the control somewhere specific in the tab order
B4X:
' 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.

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?
 

Offbeatmammal

Member
Licensed User
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!)
 

Standa

Member
Licensed User
Longtime User
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...
B4X:
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
 

Standa

Member
Licensed User
Longtime User
I have already tried hw.ShowTodayScreen, but it did not works. I forgot, that it must be outside of App_Start. Thanks.
 

agraham

Expert
Licensed User
Longtime User
Version 1.4 posted in original post. This version includes two new controls, Splitter and Listview. Between them they make possible the "classic" Explorer type app with a moveable Splitter bar. I have NOT updated the Help yet as it is a big job as Listview is a complicated control and I will need a large dose of enthusiasm to get down to do it. However I thought that I would post the library, with demos, so you can have a play.

On the device, at least on my WM2003 Axim, the Splitter only works correctly for vertically split controls. Note that you can place Splitters on Panels and Forms, and maybe Tabs as well, I haven't tried that yet!


The Listview is a virtually complete exposure of the Listview control including sorting by coluimn. In contrast to Fillippos version, which is optimised as a Table replacement, it provides LargeIcon, SmallIcon, Details and List views but on my device the List view shows nothing. A device limitation I assume. The ordering of the Icons is often not as expected in Large and SmallIcon views. As the underlying order of the items as stored is always correct I can only assume that this is a device "feature". After display they can be sorted and then display in the correct position. I haven't been able to fully characterise this behaviour but as I appear to be able to do nothing to change it I have issued this library.
 
Last edited:

yuzree

New Member
Licensed User
Hello there, :sign0087:

Any chance of getting the cs file for v1.4 to be able to merge it? Would be very grateful, cheers.
 

agraham

Expert
Licensed User
Longtime User
Any chance of getting the cs file for v1.4 to be able to merge it?
Yes. I am going to post it, and ControlsExDesktop, when I have finished writing the Listview help and added another couple of controls to bring the version up to 1.5 - probably near the end of next week.
 
Last edited:

agraham

Expert
Licensed User
Longtime User
D

Deleted member 103

Guest
No problem agraham, you have also done a good job.:sign0188:
 

agraham

Expert
Licensed User
Longtime User
Version 1.5 now posted in original post. The archive includes a new updated help file, source files for merging and demo apps for all controls included in the library.

New in this release is a MonthCalendar control. It is a bit more clumsy than a DateTimePicker or the native B4ppc Calendar controls as it is displayed fully expanded at all times. However I included it as it provides the capability of showing an arbitrary number of dates in bold and supports selection of a range of dates.
 

SteveA

Member
Licensed User
I have downloaded your excellent lib to try to resolve a screen problem and when I unzip it says 'Windows cannot open the folder.... .zip is invalid'. I have repeated the download and it still gives the same message. Is it a standard zipped file or should I be doing something different.

Thanks, Steve
 
Top