Combo box question
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Combo box question
We are using a combo box to list unique job numbers for items that in turn we use to filter items, that way they can see all items for every job if left blank or specific jobs. The drop down works great but if we type a job number in and hit return or enter, I can't get it to work. Here is what I've tried doing.
This works,
on menuPick
send openCard to card "partswindow2"
end menuPick
These do nothing,
on enterKey
send openCard to card "partswindow2"
end enterKey
on returnKey
send openCard to card "partswindow2"
end returnKey
These clears out what was typed, returns the label to what it was, then nothing.
on enterinfield
send openCard to card "partswindow2"
end enterinfield
This works,
on menuPick
send openCard to card "partswindow2"
end menuPick
These do nothing,
on enterKey
send openCard to card "partswindow2"
end enterKey
on returnKey
send openCard to card "partswindow2"
end returnKey
These clears out what was typed, returns the label to what it was, then nothing.
on enterinfield
send openCard to card "partswindow2"
end enterinfield
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Combo box question
Hi.
I assume you mean "combo box" not "option menu".
You need to use "returnInField" and "enterInField", if what I think you are trying to is right. I have no idea what the card script in the target card is up to, but at least the "openCard" message will be sent. Check out the dictionary for the subtle differences between, say, "enterKey" and "enterInField".
Craig Newman
I assume you mean "combo box" not "option menu".
You need to use "returnInField" and "enterInField", if what I think you are trying to is right. I have no idea what the card script in the target card is up to, but at least the "openCard" message will be sent. Check out the dictionary for the subtle differences between, say, "enterKey" and "enterInField".
Craig Newman
Re: Combo box question
Yes combo Box is what I was asking about,
also I mention that I tried using enterinfield, I tried returninfield as swell but with the same result, all it does is clear out what what typed and and replace the text with what was in there before typing.
also I mention that I tried using enterinfield, I tried returninfield as swell but with the same result, all it does is clear out what what typed and and replace the text with what was in there before typing.
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Combo box question
I just thought of something, on the card script it looks for the label of the combo box, If I type into the combo box and hit enter does it set the label of itself to what was typed?
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Combo box question
Hi.
Nothing should erase your entry unless you tell it to do so. I do not see this.
And yes, the current label of the combo box will be the visible text. This whether you select from the menuItems, or type and go.
Put this into your openCard handler temporarily:
Craig
Nothing should erase your entry unless you tell it to do so. I do not see this.
And yes, the current label of the combo box will be the visible text. This whether you select from the menuItems, or type and go.
Put this into your openCard handler temporarily:
Code: Select all
on opencard
put random(999) && the label of btn "yourComboBox"
end opencard
Re: Combo box question
I found the problem, the open card script was causing it to not function as intended.
as part of opencard i was updating the combo box with this
This was before filtering for the part typed in, the job menu is identical except job instead of pcmk.
my best guess as to why it broke is when typing in something it does not change the 'line item" I'm on using the drop down.
Then when i populate the list again, it replaces the label I typed with the label for the line item i'm on.
I moved this code to the end of the open card script and everything is functioning as intended, thanks for your help.
as part of opencard i was updating the combo box with this
Code: Select all
--Populate filter pcmk dropdown
put "SELECT DISTINCT pcmk FROM partsorders where partsstatus <> 'Delivered' Order BY pcmk" into tSQL
put revDataFromQuery(comma, cr, gConnectionID, tSQL) into pcmkFilterList
put "" & cr before pcmkFilterList
put pcmkFilterList into btn "P Menu"
my best guess as to why it broke is when typing in something it does not change the 'line item" I'm on using the drop down.
Then when i populate the list again, it replaces the label I typed with the label for the line item i'm on.
I moved this code to the end of the open card script and everything is functioning as intended, thanks for your help.
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här