B4J Question Always on top question

rspitzer

Active Member
I have a main form, that's basically just a background, in the main form I open up a key entry form, I have used the always on top (boolean = true) for this form. The problem is that if you touch outside this entry form, the entry form disappears back to the main form as if I just closed it (switched windows per se). How do I keep it on the screen in case of an errant touch to another part of the screen.?
 

rspitzer

Active Member
What is the file size that I can safely upload without getting an upload error saying the file is to large, right now the zip file is about 1.4 meg, what do I need to reduce it to pro-grammatically for you to accept?
 
Upvote 0

rspitzer

Active Member
I think you misunderstood my question, I used the built in utility to zip the file, no issues. When I click on attach files I get the following error - The uploaded file is too large.
What is the file size needed (i can take some stuff out, trim it down) that is acceptable for uploading.
 
Upvote 0

rspitzer

Active Member
I have attached a simple program. There is a main form (just a background), it the calls a module to open a second form that display's a text field and a single push button key. This form has a rounded black border. When the screen is touched on the key, the letter A will appear in the text field. If the screen is touched outside the border of the form then the form disappears to the main form hiding the second form, this is the issue I am having, I would like this to not happen. The platform I am using is a raspberry pi 4, (this also happens on my Microsoft surface laptop when running locally) and the version java is JDK 13.0.1 from liberica. Please note that both forms are transparent and the mouse is turned off.
 

Attachments

  • Test.zip
    9.3 KB · Views: 202
Upvote 0

rspitzer

Active Member
I take a bit of issue with your response to my inquiry. The original thread dealt with a problem where when one form was touched, it would disappear in favor of the main form. A response that I did not understand, the program. In the next thread, you asked me to upload my code to see the problem. Fine, unfortunately the code would not upload, for an issue that it was to large in size, this was miss understood and it took another thread to clear this up. Probably a grammar problem. I then went ahead and wrote a quick small test program leaving out the always on top to see if you could duplicate the problem and see if putting in the statement made it work or not work. I apologize for leaving this out, I did not understand or could read your mind as to what to actually upload. Instead now I feel publicly shamed by you with your statement. This troubles me to no end, on a different thread I read how you are trying to broaden the appeal of this product to new users, and it seems to me that this is not the way to do it. Short terse statements don't attract anyone's positive attitude towards a product. So now I have uploaded a new test file, that does contain the issue when run on a raspberry pi. If you wish not to look at it or not post this thread, that's fine, all I was doing was trying to understand an issue I was having.
 

Attachments

  • Test.zip
    9.3 KB · Views: 200
Upvote 0

rspitzer

Active Member
After some further investigation, I have found the following workarounds to this issue.
The problem seems to be coming from the Raspberry PI desktop (Rasbian) trying to my best guess assert itself.
The screen resolution of the display I am using is 1280x800. At the top of the main module the default statement for the main forms is

B4X:
#VirtualMachineArgs: -Djavafx.platform=Monocle
#MainFormWidth: 1280
#MainFormHeight: 800

If I change either the main for height of the main form width by one pixel - 1279 or 799, the problem goes away. The issue then is that the toolbar for the Raspbian desktop then shows itself at the top of the page, which is somewhat undesired in this case. Also in this case the frm.AwaysOnTop = True seems to work fine.

Another workaround I discovered, is to use in the called module, to show a form, instead of frm.Show, use frm.ShowAndWait.
I am not that familiar with this command and don't know if there are any implications to using this instead, just stumbled across it by accident.

When using that command, there is a side affect in terms of the screen, in this case touching outside the shown form, at least does not collapse the form into the background of the main form making it invisible, instead it quickly flashes the entire screen (like the screen is redrawing itself), though a bit noticeable, it is a compromise I can live with for the moment unless there's a better solution.
 
Upvote 0
Top