DMW Member Licensed User Longtime User Oct 7, 2016 #1 Hello, I decided to give B4J a try so I built a desktop application where I tried to explore almost everything with B4J. The general impression is five stars out of five. It's easy to work with and it's similarity with B4A is indeed a booster for me with my background in VB (and B4A). However, as a desktop application developer for the last 30 years I got curious to learn about the lack of controls. Coming from the Microsoft eco-system I have been used to since Win32 to have access to certain controls which I classify as basic controls. The two controls I miss is the Spinner Control and the Toolbar Control. Are there any chances that they will be added (native to B4J or via the jControlFX plugin)? Take this opportunity to say keep up the good work! Thanks, Dennis
Hello, I decided to give B4J a try so I built a desktop application where I tried to explore almost everything with B4J. The general impression is five stars out of five. It's easy to work with and it's similarity with B4A is indeed a booster for me with my background in VB (and B4A). However, as a desktop application developer for the last 30 years I got curious to learn about the lack of controls. Coming from the Microsoft eco-system I have been used to since Win32 to have access to certain controls which I classify as basic controls. The two controls I miss is the Spinner Control and the Toolbar Control. Are there any chances that they will be added (native to B4J or via the jControlFX plugin)? Take this opportunity to say keep up the good work! Thanks, Dennis
JakeBullet70 Well-Known Member Licensed User Longtime User Oct 7, 2016 #2 When you say spinner I think combo box. Upvote 0
DMW Member Licensed User Longtime User Oct 8, 2016 #3 Even if it's for non-profitable organizations I develop end-user applications for I still want to achieve the goal of being user friendly UI. It's something that some developers forget, that the products we create are supposed to be used by other users. So when I write I miss ... it's not that I cannot see any other options... But it's to try to provide with solutions that they can use Upvote 0
Even if it's for non-profitable organizations I develop end-user applications for I still want to achieve the goal of being user friendly UI. It's something that some developers forget, that the products we create are supposed to be used by other users. So when I write I miss ... it's not that I cannot see any other options... But it's to try to provide with solutions that they can use
Erel B4X founder Staff member Licensed User Longtime User Oct 8, 2016 #4 What exactly do you mean with Spinner? You can use StatusBar from jControlsFX to implement a tool bar (or you can use a pane with ImageViews). Upvote 0
What exactly do you mean with Spinner? You can use StatusBar from jControlsFX to implement a tool bar (or you can use a pane with ImageViews).
LucaMs Expert Licensed User Longtime User Oct 8, 2016 #5 Not exactly what you are searching for, but... https://www.b4x.com/android/forum/threads/controlsfx-library.50700/#content Upvote 0
Not exactly what you are searching for, but... https://www.b4x.com/android/forum/threads/controlsfx-library.50700/#content
DMW Member Licensed User Longtime User Oct 9, 2016 #6 Screen shot Thanks for the input so far. Since JavaFX Scene Builder use the name "Spinner" for the control I assumed it was the de facto name for the control. To avoid any further questions about what controls I discuss I enclose a screen shot of the Desktop App I have been working with while exploring B4J. The Spinner Control I have managed to implement via code a Spinner Control. But since I have not yet found any solution to make it editable as well, i e allow the user write directly the numbers I find it, at this stage, limited. At present the arrows works as expected. The workaround of using a text field control and a slider control is doable (with a control sub that controls only integers can be written in the textfield). But for me it's a primitive solution and take up space. Of course, a combo box can be used but only together with a very limited items. The Toolbar Control In my experiences user use the buttons best if both an image + text is available for each button. I know that for the Desktop the standard is image + tooltip but. #1 Pane/ImageViews/Images Time consuming to get the position right for each image, especially if the number of buttons increase. I have not been able to find a solution where the click on an image is "visualized". I have been able to switch cursor type when hovering over each image. Not tested to see if I can get image + text buttons. #2 Standalone ImageViews/Images The difference compared with #1 is that here I can get the click on an image to be "visualized". Not tested to see if I can get image + text buttons. #3 Statusbar/Buttons Compared with #1 and 2# this approach works best. The click on the image is "visualized" for the user. I can even add image + text on each button. But when we look we see that the images are too far top and text too close to the center. I have played around with image's and text's sizes to no avail. Another personal point is that I'm not happy with "workarounds" as they, sooner or later, tend to come back and bite me. Thanks again for all input and all the best, Dennis Attachments licman.png 54.4 KB · Views: 603 Upvote 0
Screen shot Thanks for the input so far. Since JavaFX Scene Builder use the name "Spinner" for the control I assumed it was the de facto name for the control. To avoid any further questions about what controls I discuss I enclose a screen shot of the Desktop App I have been working with while exploring B4J. The Spinner Control I have managed to implement via code a Spinner Control. But since I have not yet found any solution to make it editable as well, i e allow the user write directly the numbers I find it, at this stage, limited. At present the arrows works as expected. The workaround of using a text field control and a slider control is doable (with a control sub that controls only integers can be written in the textfield). But for me it's a primitive solution and take up space. Of course, a combo box can be used but only together with a very limited items. The Toolbar Control In my experiences user use the buttons best if both an image + text is available for each button. I know that for the Desktop the standard is image + tooltip but. #1 Pane/ImageViews/Images Time consuming to get the position right for each image, especially if the number of buttons increase. I have not been able to find a solution where the click on an image is "visualized". I have been able to switch cursor type when hovering over each image. Not tested to see if I can get image + text buttons. #2 Standalone ImageViews/Images The difference compared with #1 is that here I can get the click on an image to be "visualized". Not tested to see if I can get image + text buttons. #3 Statusbar/Buttons Compared with #1 and 2# this approach works best. The click on the image is "visualized" for the user. I can even add image + text on each button. But when we look we see that the images are too far top and text too close to the center. I have played around with image's and text's sizes to no avail. Another personal point is that I'm not happy with "workarounds" as they, sooner or later, tend to come back and bite me. Thanks again for all input and all the best, Dennis
Daestrum Expert Licensed User Longtime User Oct 10, 2016 #7 Re: Editable spinner Code: jo.InitializeNewInstance("javafx.scene.control.Spinner",Array(1,10,5)) jo.RunMethod("setEditable",Array(True)) Note The enter key must be pressed after entering number to re-sync the control and the value. Also there is no cursor shown in the control initially unless you TAB to the control. Last edited: Oct 10, 2016 Upvote 0
Re: Editable spinner Code: jo.InitializeNewInstance("javafx.scene.control.Spinner",Array(1,10,5)) jo.RunMethod("setEditable",Array(True)) Note The enter key must be pressed after entering number to re-sync the control and the value. Also there is no cursor shown in the control initially unless you TAB to the control.
Erel B4X founder Staff member Licensed User Longtime User Oct 10, 2016 #8 Spinner will be added in the next version of B4J. Upvote 0
DMW Member Licensed User Longtime User Oct 10, 2016 #9 Daestrum: Thanks, it works well Erel: Thank You, that's good news! Upvote 0
jmon Well-Known Member Licensed User Longtime User Oct 12, 2016 #10 To set your button images, try this: https://www.b4x.com/android/forum/threads/how-to-add-an-icon-to-a-button-via-code.57733/#post-363608 Then on the css of your button you need to set a padding: Code: CSSUtils.SetStyleProperty(btn, "-fx-padding", "4px") Setting the padding with CSSUtils is the recommended method. By the way, this is not a workaround, this is the way it has to be done. [edit]Just a suggestion: I suggest removing your toolbar, as it seems not so important. You could use tooltips as the help for each node, the info button could be moved to you "about" tab, exit & save could be in a menu, or just by clicking the "X"button at the top right Last edited: Oct 12, 2016 Upvote 0
To set your button images, try this: https://www.b4x.com/android/forum/threads/how-to-add-an-icon-to-a-button-via-code.57733/#post-363608 Then on the css of your button you need to set a padding: Code: CSSUtils.SetStyleProperty(btn, "-fx-padding", "4px") Setting the padding with CSSUtils is the recommended method. By the way, this is not a workaround, this is the way it has to be done. [edit]Just a suggestion: I suggest removing your toolbar, as it seems not so important. You could use tooltips as the help for each node, the info button could be moved to you "about" tab, exit & save could be in a menu, or just by clicking the "X"button at the top right
DMW Member Licensed User Longtime User Oct 12, 2016 #11 Thanks for Your input which works great My basic approach for this app is to explore as much features as possible in B4J. Practically I fully agree with You. Upvote 0
Thanks for Your input which works great My basic approach for this app is to explore as much features as possible in B4J. Practically I fully agree with You.