B4J Question [SOLVED] Custom View from 2 views

Adie

Member
Licensed User
Longtime User
I am considering to develop my next app in B4J. Before this can happen I need to do some research on extending the core functionality.

Hurdle 1: [SOLVED] with [LabeledTextField] sample
With C++Builder I could create new objects and extend the functionality similar to Custom views in B4X.

I combined an EditText and a Label to form a new LabeledEditText. This component (class) also included all business logic from lookup to validation etc. Main reason is development speed and compact final application. Any change of the new component is reflected throughout after a recompile. Additional properties set the type, editor mask etc etc.

Question: is it possible to create a new Custom View based on more than one 'master' view? I could not find any samples on the forum. Is this possible?

Hurdle 2:
I created a generic full data aware Dialog with [Undo] [Save] [Close] etc buttons as well as all standard functionality. To create an edit/add/delete dialog for something like a stock item only requires me to drop the LabeledEditText(s) etc and add less than 20 lines of code to do unique validation.

Question: [SOLVED] Can I create a new CLASS with the basic form (buttons and core functionality) Maybe the question must be: How do I use 'LoadLayout"

Question: Where do I change the default form size in the WYSIWYG preview? I can change the abstract designer in 'Variants' but the WYSIWYG stay at 600 x 600.

Adie
 
Last edited:

Adie

Member
Licensed User
Longtime User
All questions [SOLVED] now with your post above.

I will change the size of the WYSIWYG manually until the form layout is complete. Fortunately I am old school so I plan each form fully before I start to code. during coding the first step is the layout and then the business logic.

All my apps are for technical applications and the user can not resize etc etc. All data is super validated before save to SQL as a lot of data are inter related. It was actually interesting that I made a list of basic criteria to meet and then typed the post while searching. I even went through the B4X and B4J 'Books' to get an overall idea of the system functionality/process. The 'doors opened' right at the end when I understood the way classes and Custom views worked.

I normally develop a whole 'ecosystem' in the chosen language before I start developing (bug free) products. This was done with dBase, Clipper, XBase, C++ etc. The Java system will be called 'EnviroJ' :). I will post snippets here for other programmers to use/learn/comment.

Thanks
 
Upvote 0
Top