Enterkey behaviour
Hello to all !
I'm new in this community.
I tried some things in Jabaco which are very important for me.
One of this is the "Enter Key Behaviour" in Editboxes.
Jabaco uses the VB / .NET way of jumping from one box to the next - with Tab.
This is the Microsoft-Standard, but not what I need.
I'm writing software for inventory management, cash systems, and for the componies organisation and administration.
The mostly "things" are entered are numbers. So the number-block of the keyboard is the most important part of this work. But the Enterkey doesn't work. Using the Tab-key for going to the next editbox is not practicable at all.
Think about a cash system. In one hand you have an barcode-scanner, with the other you enter quantity and maybe the price - on the numberblock. And than you have to use the tab-key ? Thats not practicable at all.
So my question: Is their a chance to implement the Enter-key as doing that what tab does ? Some other IDE's have a property called "EnterKeyBehaviour". Maybe there is a way in Jabaco. But I don't know which.
Generally Jabaco seems to be a good alternative to VB / VB.Net. And the best of all: It produces jar-files.
Some bugs are in the IDE. Is Jabaco still under construction ? When will come a new release ?
Thank you for answering this questions
Gerhard from Austria
I'm new in this community.
I tried some things in Jabaco which are very important for me.
One of this is the "Enter Key Behaviour" in Editboxes.
Jabaco uses the VB / .NET way of jumping from one box to the next - with Tab.
This is the Microsoft-Standard, but not what I need.
I'm writing software for inventory management, cash systems, and for the componies organisation and administration.
The mostly "things" are entered are numbers. So the number-block of the keyboard is the most important part of this work. But the Enterkey doesn't work. Using the Tab-key for going to the next editbox is not practicable at all.
Think about a cash system. In one hand you have an barcode-scanner, with the other you enter quantity and maybe the price - on the numberblock. And than you have to use the tab-key ? Thats not practicable at all.
So my question: Is their a chance to implement the Enter-key as doing that what tab does ? Some other IDE's have a property called "EnterKeyBehaviour". Maybe there is a way in Jabaco. But I don't know which.
Generally Jabaco seems to be a good alternative to VB / VB.Net. And the best of all: It produces jar-files.
Some bugs are in the IDE. Is Jabaco still under construction ? When will come a new release ?
Thank you for answering this questions
Gerhard from Austria
Grüß Gott Gerhard!
the following sample demonstrates how to intercept the Enter key and jump forth and back between TextBox controls.
This should solve your requirement. Does it?
You are right assuming that Jabaco is still under development.
The Jabaco toolset is being developed by Manuel, the "father of Jabaco".
The Jabaco framework, a set of Jabaco/Java classes is open source.
Volunteers are welcome!
If you spot errors and deficiencies not already mentioned in this forum,
your remarks are welcome. Other contributions like samples, suggestions
and amendments to the framework would be welcome too!
Happy experimenting!
A1880
the following sample demonstrates how to intercept the Enter key and jump forth and back between TextBox controls.
|
|
Jabaco Source |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
Option Explicit Public Sub Form_Load() Text1.Text = "" Text2.Text = "" Text1.SetFocus End Sub Public Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) trace "Text1_KeyDown " & KeyCode & ";" & Shift End Sub Public Sub Text1_KeyPress(KeyAscii As Integer) trace "Text1_KeyPress " & KeyAscii If KeyAscii = 10 Then ' user pressed Enter or Return Text2.SetFocus End If End Sub Public Sub Text1_Change(ChangeType As ChangeType, ChangeEvt As DocumentEvent) trace "Text1_Change " & ChangeType & ";" & ChangeEvt End Sub Public Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer) trace "Text2_KeyDown " & KeyCode & ";" & Shift End Sub Public Sub Text2_KeyPress(KeyAscii As Integer) trace "Text2_KeyPress " & KeyAscii If KeyAscii = 10 Then ' user pressed Enter or Return Text1.SetFocus End If End Sub Public Sub Text2_Change(ChangeType As ChangeType, ChangeEvt As DocumentEvent) trace "Text2_Change " & ChangeType & ";" & ChangeEvt End Sub Private Sub trace(msg As String) Debug.Print msg End Sub |
This should solve your requirement. Does it?
You are right assuming that Jabaco is still under development.
The Jabaco toolset is being developed by Manuel, the "father of Jabaco".
The Jabaco framework, a set of Jabaco/Java classes is open source.
Volunteers are welcome!
If you spot errors and deficiencies not already mentioned in this forum,
your remarks are welcome. Other contributions like samples, suggestions
and amendments to the framework would be welcome too!
Happy experimenting!
A1880
Thank's a lot for your message A1880.
Well, to do this, like your example shows, is a lot of work if you have to do it with every control you need to press enter. For example: I'm looking foreward to write the new version of my inventory management in a language which is system independant. The current version in in Access.
I'm coming from VB / VB.Net / VBA, so it will be much easier for me to do the new version in a system like Jabaco which has a very VB-like syntax and can produce systemindependant jar-files.
Well, the current version has 197 forms, some with more than 50 controls - most of it editboxes. The complete software is mouse-independant. All functions can be reached with keys. this makes it easier for the users.
My wish is, that the EnterKey-Behaviour is a property of the controls. This would make it easier for me.
One bug concerns to the Label-Control. If you try to change the BackColor (button ...), then the BorderColor will be changed.
Thanks again
Gerhard
Well, to do this, like your example shows, is a lot of work if you have to do it with every control you need to press enter. For example: I'm looking foreward to write the new version of my inventory management in a language which is system independant. The current version in in Access.
I'm coming from VB / VB.Net / VBA, so it will be much easier for me to do the new version in a system like Jabaco which has a very VB-like syntax and can produce systemindependant jar-files.
Well, the current version has 197 forms, some with more than 50 controls - most of it editboxes. The complete software is mouse-independant. All functions can be reached with keys. this makes it easier for the users.
My wish is, that the EnterKey-Behaviour is a property of the controls. This would make it easier for me.
One bug concerns to the Label-Control. If you try to change the BackColor (button ...), then the BorderColor will be changed.
Thanks again
Gerhard
Hi,
you could invent your own TextBox control as a derivative of the original TextBox with the intended behaviour.
In Jabaco you have several options to do that:
- Write a "UserControl" as part of your project
(this is probably the easiest way for a start; user controls are quick to design, test and change)
- Change the existing TextBox implementation by adding a property or extend the Jabaco framework by a derived TextBox
(look a the source of TextBox.jsrc and write a Jabaco sub-class)
- Write your own additional framework which you include in your project as external *.jar file
Please post your bug reports as separate postings in the respective forum category.
Otherwise, it becomes tedious for developers to get your findings transferred to their to do list.
Success!
A1880
you could invent your own TextBox control as a derivative of the original TextBox with the intended behaviour.
In Jabaco you have several options to do that:
- Write a "UserControl" as part of your project
(this is probably the easiest way for a start; user controls are quick to design, test and change)
- Change the existing TextBox implementation by adding a property or extend the Jabaco framework by a derived TextBox
(look a the source of TextBox.jsrc and write a Jabaco sub-class)
- Write your own additional framework which you include in your project as external *.jar file
Please post your bug reports as separate postings in the respective forum category.
Otherwise, it becomes tedious for developers to get your findings transferred to their to do list.
Success!
A1880
Arrays of controls are feasible
Arrays of controls are feasible in Jabaco but a bit different compared to VB6.
Look here for an example.
Greetings!
A1880
Look here for an example.
Greetings!
A1880
Similar threads
-
Tips, Tricks, Samples & Tutorials »-
TypeOf Is
(Feb 8th 2009, 2:44pm)
-
Allgemeine Themen, Fragen und Diskussionen »-
Cursor in Textbox immer schwarz?
(Oct 6th 2009, 5:03pm)
-
Tips, Tricks, Samples & Tutorials »-
List all superclasses interfaces and methods
(Mar 15th 2009, 10:26pm)
-
General topics, questions and discussions »-
Control.ZOrder
(Jan 18th 2009, 10:39pm)
