Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Dec 11, 2019 4:45 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: combobox does not "change"
PostPosted: Sun Jul 31, 2011 9:26 am 
Offline

Joined: Sun Jul 31, 2011 8:34 am
Posts: 3
Situation: I create a combobox, I populate it, In the change event I put something

sub change()
msgbox me.Text
end sub


I build for windows and mac. On mac, I can click, type, type partially and click... it works.

On windows, change event occurs only if I open the comboxo with the mouse and select the item with the mouse. If I type, if I type and click, if I type and exit from the combobox with tab, enter... nothing. No change event. and I think thisi is not the normal behaviour under windows.

here is my screencasting http://www.domenicosaggese.it/informatica/modules/news/article.php?storyid=24
Any Idea?
thank you....

_________________
-------
http://www.domenicosaggese.it


Top
 Profile  
Reply with quote  
 Post subject: Re: combobox does not "change"
PostPosted: Sun Jul 31, 2011 11:29 am 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
Maybe you should look at the PopupMenu instead? The combobox should only be used if the user can type whatever text they want. The popupMenu is the better choice when the user is selecting from a specific set of options.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: combobox does not "change"
PostPosted: Mon Aug 01, 2011 1:37 pm 
Offline

Joined: Mon Aug 14, 2006 9:33 pm
Posts: 1774
The "Change" event is to fire ONLY when the user changes the selection from the menu. You have the "TextChanged" event, the gotFocus and lostfocus events for the other situations you mention. That should be the behavior.

_________________
Roger Clary
Class One Software
Educational Software for Lifelong Learning
http://www.classonesoftware.com


Top
 Profile  
Reply with quote  
 Post subject: Re: combobox does not "change"
PostPosted: Wed Aug 03, 2011 3:10 pm 
Offline

Joined: Sun Jul 31, 2011 8:34 am
Posts: 3
Bob Keeney wrote:
Maybe you should look at the PopupMenu instead? The combobox should only be used if the user can type whatever text they want. The popupMenu is the better choice when the user is selecting from a specific set of options.

Thank you, I solved my situation with some workarounds, for example, with an editfield and a listbox (filtered by the editfield) but not always that's possibile.

A well working combobox should be useful to select a customer between some hundred, or to select a town in a list. My users already had an application in MS Access with comboboxes, and I had to propose them to change their habits...

_________________
-------
http://www.domenicosaggese.it


Top
 Profile  
Reply with quote  
 Post subject: Re: combobox does not "change"
PostPosted: Wed Aug 03, 2011 3:24 pm 
Offline

Joined: Sun Jul 31, 2011 8:34 am
Posts: 3
classone wrote:
The "Change" event is to fire ONLY when the user changes the selection from the menu. You have the "TextChanged" event, the gotFocus and lostfocus events for the other situations you mention. That should be the behavior.

thank you for the answer,

why this is true in rb-mac and not ir rb-win?
why this is for rb-windows and not in MS Access, for example?
why an user must understand that if he types, he cannot select?

I understand I have to do workarounds, but we should say this is a serious problem in RB/RS.

_________________
-------
http://www.domenicosaggese.it


Top
 Profile  
Reply with quote  
 Post subject: Re: combobox does not "change"
PostPosted: Wed Aug 03, 2011 3:44 pm 
Offline

Joined: Mon Aug 14, 2006 9:33 pm
Posts: 1774
This has nothing to do with the user. As has been stated, you have other events which fire when the user types. The change event is for when the user selects from the pop up list. It is up to you, the programmer, to use the correct event within RB to get what you want.

_________________
Roger Clary
Class One Software
Educational Software for Lifelong Learning
http://www.classonesoftware.com


Top
 Profile  
Reply with quote  
 Post subject: Re: combobox does not "change"
PostPosted: Wed Aug 10, 2011 4:35 pm 
Offline

Joined: Sat Oct 01, 2005 5:19 pm
Posts: 3216
classone wrote:
This has nothing to do with the user. As has been stated, you have other events which fire when the user types. The change event is for when the user selects from the pop up list. It is up to you, the programmer, to use the correct event within RB to get what you want.


Though I agree with this statement, I have never used the combo box with RB because it's still a hack and not the native Windows Combo Box. Much easier to create your own Combo Box with an TextField and a Menu.

Yes MS Access uses the Windows Combo Box, but you don't need to 'program' it the same way you would in Visual Studio, MS has done a lot of the work for you, knowing your going to use it for Database operations.


Top
 Profile  
Reply with quote  
 Post subject: Re: combobox does not "change"
PostPosted: Thu Jan 19, 2012 10:51 am 
Offline
User avatar

Joined: Thu Nov 15, 2007 4:07 am
Posts: 313
Location: 't Zand, The Netherlands
I am having the same problem on Linux. Selecting a list item by typing some letters does not fire the Change event, nor the TextChange event, even though text is being changed. KeyDown does not do the trick either. The only response I get is when I open the dropdown menu with a mouse click and select an item. Any other change won't fire anything, or so it seems.

A situation where this becomes annoying, is when you have a textfield for IDs and the combobox for their equivalent names. Changing the ID perfectly selects the name, but typing the start of a name and then selecting it from the list won't change the ID in the textfield, no matter what combobox event I try.

This clearly seems a bug, on Linux anyway.

Frank

_________________
Debian Sqeeze - Real Studio 2011r4
You have to have a little programming fun every day!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

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