Newbie Question - Grid Control in panel

stu14t

Active Member
Licensed User
Longtime User
I've only just started using Basic4android as I am, previously, a self taught VB.net CF developer. It's really opened some exciting opportunities for some of my old projects.:sign0104:

With that in mind, I'm porting an application I wrote over 12 years ago for the civil engineering and construction industry, which is still on sale today.

The project requires a grid to display data entered by the user. However, there is also a keypad and various other controls on the form.

I have searched the forums and found many examples of classes and 3rd party libraries to do what I need to do but they all seem to use the full form width, height or both. Is there a way to place my grid in only part of the form within a panel?

I may be missing something obvious and I apologise in advance If I have.
 

klaus

Expert
Licensed User
Longtime User
Sure you can !
In general you need to add a view where you define the dimensions and position.
If you look at the two first examples in the ScrollView examples they are not full screen.
In the Table Class when you add a table you must define the dimesnsion and size:
Table1.AddToActivity(Activity, 0, 0, 100%x, 50%y)
If you don't want full screen width change the value.

Best regards.
 
Last edited:
Upvote 0

stu14t

Active Member
Licensed User
Longtime User
Klaus,

Thanks for the pointer on that.

Is it possible to add a panel to the from and then use the code:
B4X:
Table1.AddToActivity(Panel1, 0, 0dip, 100%x, 50%y)
 
Upvote 0

stu14t

Active Member
Licensed User
Longtime User
Klaus,

No, it's not really necessary but I like to try and understand the syntax of a new language when I'm learning.

I've actual used the first example and placed the grid straight on the form. I used a panel just to size and located where I wanted the table.

With the access to all the libraries and functions of the phone, i'm finding the language more versatile than the .net CF.

Many thanks Klaus

:sign0098:
 
Upvote 0
Top