B4J Question Using B4J for creating business/database apps

Magma

Expert
Licensed User
Longtime User
Hi there..

I am searching a way to make fast small apps for business use...

For example creating a simple Invoice Sales System (not a simple pos) but i am stucked when looking controls of b4j...

For example there is no Masked Text Box... or TextBox with HintSearch or the Combo Text Box is very simple... (not searching into itself when typing)...

+ the tableview seems too simple..

is there any library with all these extras working good ?

Is b4j MariaDB compatible >? (why not i think - mysql mariadb odbc drivers will be the same aren't they?)

What about Printing to a Printer is there a way ?
 

souzafo

Member
Licensed User
Longtime User
I'm also looking for a solution to Businness Apps. I believe the best option is to use the framework ABMATERIAL (link: https://www.b4x.com/android/forum/threads/abmaterial-framework-for-webapps.60072/)
The JDBC you can use MariaDB without problems (I 'm testing with PostGreSQL Database) .
About printer solution , if you are a donor of the ABMAterial, you will have access to exclusive libraries , including one that allows you to export reports created with JasperReposts to PDF, XML and HTML.

Best Regards
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

Magma

Expert
Licensed User
Longtime User
B4X:
Sub txtField1_TextChanged (Old As String, New As String)
  If New.Length = 1 And New.CharAt(0)="," Then
      txtField1.Text=""
    Else

  If New.Length=0 Then
      txtField1.Text=""
Else
 
  If New.CharAt(New.Length-1)="," And Old.Contains(",")=True Then
    New=co.Left(New,New.Length-1)
    txtField1.Text = New
    Else
  If New.CharAt(New.Length-1)="," Then
      New = New & "00"
    If New.Length >10 Then New=co.Left(New,10)
    txtField1.Text = New

    Else      
   Dim sb As StringBuilder
   sb.Initialize
   For i = 0 To New.Length - 1
     If "0123456789,".IndexOf(New.CharAt(i)) > -1 Then
           sb.Append(New.CharAt(i))
       
     End If
   Next
   txtField1.Text = sb.ToString
   If txtField1.Text.Length>10 Then txtField1.Text=co.left(txtField1.Text,10)
   txtField1.SetSelection(txtField1.Text.Length, txtField1.Text.Length)
   End If
   End If
   End If
   End If
If New.Length - Old.Length = 2 Then     txtField1.SetSelection(txtField1.Text.Length-2, txtField1.Text.Length)
End Sub

I ve played a little - this one txtfield is for taking only decimal or integer at max length of 10 chars.. + when you type comma "," puts two decimal digits

+ how i can make it - the text inside texbox aligned to right ?
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
txtField1.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.RIGHT)

Not worked...

B4J version: 4.20 (1)
Parsing code. Error
Error parsing program.
Error description: Undeclared variable 'gravity' is used before it was assigned any value.
Occurred on line: 24 (Main)
txtField1.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.RIGHT)

if new.length is 0, txtfield1.Text is already ""
You are right .... if stays ...rem txtfield1.text and give else all the other... :)
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Using CSSUtils library to right justify the textfield use
B4X:
 CSSUtils.SetStyleProperty(yourTextField,"-fx-alignment","center-right")
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
Worked ! Thanks...
ps for all: any help for making my sub/textfield custom control will help :)

Using CSSUtils library to right justify the textfield use
B4X:
CSSUtils.SetStyleProperty(yourTextField,"-fx-alignment","center-right")
 
Upvote 0

Dailson Coelho Machado

Member
Licensed User
Longtime User
Hi, from brazil!
What's this?

B4J version: 4.50
Parsing code. Error
Error parsing program.
Error description: Undeclared variable 'co' is used before it was assigned any value.
Occurred on line: 34 (Main)
New=co.Left(New,New.Length-1)

Variable : New=co.Left(New,New.Length-1)
 
Upvote 0
Top