Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Oct 23, 2019 12:41 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: MenuBar causing buttons to be unclickable
PostPosted: Thu Mar 04, 2010 5:26 pm 
Offline

Joined: Wed Mar 25, 2009 4:30 pm
Posts: 245
Location: Alexandria, VA, USA
Here's a weird one:

I thought all my pushbuttons and bevelbuttons weren't working in Linux. When you click on them they show the "push" effect but nothing happens. It turns out I was wrong: you can push them, you just have to move your mouse up about 15 pixels and click in the invisible space where it looks like there is no button.

I've uploaded a picture to illustrate, even though it's really just my best guess about where I have to push. The red squares are where I have to click to access each button.

Image

It affects the pushbuttons, bevelbuttons and a splitter control, but not text, checkboxes or comboboxes.

What on earth is going on here? This code works great on Mac and Windows. It's the last thing I have to overcome to get the software working on Linux. Any ideas?

Cheers,

-Mike

Edit: I changed the subject to reflect the fact that this is caused by the MenuBar.


Last edited by rebrandsoftware on Fri Mar 05, 2010 5:19 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Button "clickable" area is not over the button?
PostPosted: Thu Mar 04, 2010 5:34 pm 
Offline

Joined: Wed Mar 25, 2009 4:30 pm
Posts: 245
Location: Alexandria, VA, USA
Also, even though those red squares show where it seems like the clickable area has moved, it doesn't work if I click the actual button in that area.

For example, the Browse button can be clicked by clicking above it, but the Add button can only be clicked if you click the space bettween the Browse and Add buttons.

Nothing ever happens when I click an actual button.


Top
 Profile  
Reply with quote  
 Post subject: Re: Button "clickable" area is not over the button?
PostPosted: Thu Mar 04, 2010 7:02 pm 
Offline

Joined: Fri Sep 30, 2005 10:01 am
Posts: 283
Location: Germany, Munich
I'm also deploying an app that shall run on Linux, and your results worry me.
Have you found out more?
Have you reported it as a bug?
What happens if you disable the use of the menu bar so that all items move up? Does it work then?

_________________
User of RB since first version. Provider of many free and outdated plugins.
Code for sharing: http://www.tempel.org/RB/Resources
Arbed, a unique tool for editing projects: http://www.tempel.org/Arbed
Zip compression classes: http://www.tempel.org/RB/ZipPackage


Top
 Profile  
Reply with quote  
 Post subject: Re: Button "clickable" area is not over the button?
PostPosted: Fri Mar 05, 2010 9:37 am 
Offline

Joined: Wed Mar 25, 2009 4:30 pm
Posts: 245
Location: Alexandria, VA, USA
Right now I'm still stumped but if I find a solution I'll certainly post it here.


Top
 Profile  
Reply with quote  
 Post subject: Re: Button "clickable" area is not over the button?
PostPosted: Fri Mar 05, 2010 4:37 pm 
Offline

Joined: Wed Mar 25, 2009 4:30 pm
Posts: 245
Location: Alexandria, VA, USA
It turns out it was the menubar doing it. I'm not sure what to do about that because my app definitely needs the menubar. Now that I know the cause I'll search around the forums and see if anyone else has had this problem.

-Mike


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuBar causing buttons to be unclickable
PostPosted: Fri Mar 05, 2010 4:59 pm 
Offline

Joined: Wed Mar 25, 2009 4:30 pm
Posts: 245
Location: Alexandria, VA, USA
I've tried adding the menubar after the form has already fully loaded but it doesn't make a difference. Does anyone know why this is happening?


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuBar causing buttons to be unclickable
PostPosted: Fri Mar 05, 2010 5:17 pm 
Offline

Joined: Wed Mar 25, 2009 4:30 pm
Posts: 245
Location: Alexandria, VA, USA
Some more test results:

1) It's not something I'm doing to my menubar, the default menubar causes the same problem
2) It's not because the buttons are inside groupboxes
3) If I load a window with an empty menu bar the buttons work as usual. If I then add a menubar through code the buttons stop working.

As far as I can see from searching the forums no one has posted a question about this before.


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuBar causing buttons to be unclickable
PostPosted: Fri Mar 05, 2010 5:42 pm 
Offline

Joined: Fri Sep 30, 2005 10:01 am
Posts: 283
Location: Germany, Munich
Whatever you find, please do the rest of us a favor and report this as a bug to RS with their Feedback app, and make sure they can reproduce it. Would be much appreciated.

_________________
User of RB since first version. Provider of many free and outdated plugins.
Code for sharing: http://www.tempel.org/RB/Resources
Arbed, a unique tool for editing projects: http://www.tempel.org/Arbed
Zip compression classes: http://www.tempel.org/RB/ZipPackage


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuBar causing buttons to be unclickable
PostPosted: Fri Mar 05, 2010 10:40 pm 
Offline
User avatar

Joined: Thu Mar 05, 2009 1:03 pm
Posts: 1786
Location: USA
I see you're using a splitter - try taking that out and see if it fixes your problem.
I can't imagine how a splitter would be causing this kind of problem, but it's even less conceivable that a MenuBar is doing it (unless showing the MenuBar is pushing the graphical part of the buttons down, while leaving the invisible, clickable part intact).

_________________
With great power comes great responsibility.
Learn something new every day, and the rest will take care of itself.
Life is a journey, not a destination. Enjoy the trip! :D


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuBar causing buttons to be unclickable
PostPosted: Sat Mar 06, 2010 2:02 am 
Offline
User avatar

Joined: Wed Nov 15, 2006 3:50 pm
Posts: 2353
Location: England
Can I clarify?
When you say menubar, do you mean the menu that runs along the top File/Edit/Languages etc?

My app carries one of those (most apps will), and I dont see the effects you are seeing.
I havent tried lots of Linux distros, my current Vm is using an Ubuntu distro thats about 4-5 years old.

I do wonder if you have set the screen resolution to the equivalent of Windows' Large Font settings..
ie is the screen running at 96dpi or something like 120 dpi?
Mind you ,if that is the cause, I would expect the difference between control and hit rectangle to vary from the top of the window to the bottom, rather than be a fixed 15 pixels.


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuBar causing buttons to be unclickable
PostPosted: Sat Mar 06, 2010 2:33 am 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
When you say "menubar", do you actually mean "toolbar"?


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuBar causing buttons to be unclickable
PostPosted: Mon Mar 08, 2010 10:42 am 
Offline

Joined: Wed Mar 25, 2009 4:30 pm
Posts: 245
Location: Alexandria, VA, USA
Hi, thanks for the replies.

By MenuBar I mean: File > Edit > Languages > About

Sorry for the confusion, I just assumed it was called a MenuBar since to add one you choose Add Menu Bar and then add it to your window's MenuBar property.

I tested removing various controls until I found the one that is causing the problem. Removing the splitter and toolbar had no effect. Removing the menubar resolved the problem.

If I have a form with no menubar I don't encounter this problem, but if I then create a button that adds a menubar during run time all the buttons get funky again.

I'm running Ubuntu 9.04 off the CD drive, so it's a clean install every time. I will try the suggestion about changing the resolution and see if that makes a difference.

I suspect that all the buttons are indeed off by 15px.

-Mike


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuBar causing buttons to be unclickable
PostPosted: Mon Mar 08, 2010 11:13 am 
Offline

Joined: Wed Mar 25, 2009 4:30 pm
Posts: 245
Location: Alexandria, VA, USA
Looks like it was running at 96 DPI.


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuBar causing buttons to be unclickable
PostPosted: Mon Mar 08, 2010 12:15 pm 
Offline
User avatar

Joined: Wed Nov 15, 2006 3:50 pm
Posts: 2353
Location: England
if it only happens because of adding the menu at runtime, can it not be added at design time?

or if not, can a placeholder menu be added at design time, followed by replacing the menu by the 'real one' at run time?


Top
 Profile  
Reply with quote  
 Post subject: Re: MenuBar causing buttons to be unclickable
PostPosted: Tue Mar 09, 2010 9:47 am 
Offline

Joined: Wed Mar 25, 2009 4:30 pm
Posts: 245
Location: Alexandria, VA, USA
It happens during both runtime and design time. I was hoping that adding it during runtime might solve the problem but it doesn't.

It turns out that this is almost definitely caused by something I am doing. I tried a simple test form with just a menubar and a button, and that worked without causing the button issue.

It's going to take some detective work to figure out exactly what I've done that could cause such a weird bug.

-Mike


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group