onselect and presskey enter

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
kfritz
Profound User
Posts: 64
Joined: Thu Aug 04, 2011 4:53 am
First Name: Karl
Last Name: Fritz
Company Name: Logic IT Services
Address 1: Fluhgasse 141
City: Laufenburg
Zip / Postal Code: 5080
Country: Switzerland
Location: Switzerland
Contact:

onselect and presskey enter

Post by kfritz »

Pls can somebody help me to define an automatic enter key on "onselect" of a combo-box. The meaning is to create a automatic dropdown menu for functions like "update, delete..." But the user should enter the function code manually as well. Or is this idea impossible? Thanks. Karl
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: onselect and presskey enter

Post by Brian »

You should be able to put pui.click(); in the onselect property to force control back to your program. I'm not sure I understand the second part.

Are you saying you want the user to type something in the combo box, then select Update, Delete, etc from the SAME combo box and retain what they typed?
kfritz
Profound User
Posts: 64
Joined: Thu Aug 04, 2011 4:53 am
First Name: Karl
Last Name: Fritz
Company Name: Logic IT Services
Address 1: Fluhgasse 141
City: Laufenburg
Zip / Postal Code: 5080
Country: Switzerland
Location: Switzerland
Contact:

Re: onselect and presskey enter

Post by kfritz »

Thanks Brian
I found the solution with the "pui-click" and it works fine. What i want to do is, select with a combo-box the functions of the program, like a popup menu for each subfile record. Do you understand me better now?
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: onselect and presskey enter

Post by Brian »

Ok. Yes a drop down for choosing actions on a grid is very normal. Glad you worked it out.
kfritz
Profound User
Posts: 64
Joined: Thu Aug 04, 2011 4:53 am
First Name: Karl
Last Name: Fritz
Company Name: Logic IT Services
Address 1: Fluhgasse 141
City: Laufenburg
Zip / Postal Code: 5080
Country: Switzerland
Location: Switzerland
Contact:

Re: onselect and presskey enter

Post by kfritz »

one question again...
the combo box works fine now, but if i want enter manually a functioncode in this combo box field, the value will be ignored. This means, i type a "2" for update in the combo-box field and hit submit. This should fire the update screen, but nothing happens. A dropdown select is ok.
Definition: Selection with choices...
I do the same with a combo box in the update program and there run both kind of selection.
Definition: Database driven selection...
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: onselect and presskey enter

Post by Brian »

Are you sure your RPG program is not receiving the "2" and you are just not monitoring for it?
kfritz
Profound User
Posts: 64
Joined: Thu Aug 04, 2011 4:53 am
First Name: Karl
Last Name: Fritz
Company Name: Logic IT Services
Address 1: Fluhgasse 141
City: Laufenburg
Zip / Postal Code: 5080
Country: Switzerland
Location: Switzerland
Contact:

Re: onselect and presskey enter

Post by kfritz »

Hi Brian

If I select the value by dropdown selection, the value will be submitted and fires a function - a manual input not.

Karl

Defs:
Identification:
Field Type: combo box
Value: SELEKT
Selection Choices:
Choices: select,update,copy,delete,view
Choice Values: 1,2,3,4,5
Events:
onchange: pui.click("btnSubmit")
onselect: pui.click("btnSubmit")
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: onselect and presskey enter

Post by Brian »

Ok. I assume you are doing a readc in your program to find the record that was changed. When you debug the program, is READC finding the record you typed an option on?
kfritz
Profound User
Posts: 64
Joined: Thu Aug 04, 2011 4:53 am
First Name: Karl
Last Name: Fritz
Company Name: Logic IT Services
Address 1: Fluhgasse 141
City: Laufenburg
Zip / Postal Code: 5080
Country: Switzerland
Location: Switzerland
Contact:

Re: onselect and presskey enter

Post by kfritz »

Brian,
I have three possibilities:
1st: I call the native rpg-pgm (green screen) - record found
2nd: I call PUI and select with dropdown of the combo box - record found
3rd: I call PUI and select with a manual entry in the combo box - NOT found

If I check the values (Firebug) these are all the same, regardless of a dropdown or manual entry. If you don't believe it, I am glad to send you the sources by email.

Thanks,
Karl
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: onselect and presskey enter

Post by Brian »

I don't doubt you, I'm just going through a list of possibilities in my head. Perhaps sending me the source is the best option. You can send it to the support at profoundlogic dot com address.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests