Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Drop-downs and List Boxes |
Post Reply |
Author | |
wrightj
Beginner Joined: 07 Jun 10 Status: Offline Points: 6 |
Post Options
Thanks(0)
Posted: 22 Jul 10 at 8:56PM |
I can't seem to figure out how to find out what index is selected nor what text is being displayed if the user typed their own selection. How can I find out what is being displayed in a Drop-down list and what item is selected in a List Box.
Drop-Down List Properties: Field Title: form1[0].#subform[0].DropDownList1[0] Field Description: Drop-down List Field Caption: Field Type: 5 Field Choice Type: 2 Field Value: Field Value By Title: Field Default Value: Field Flags: 67502082 Sub-count = 6, so 6 sub-items Item 1, Field Sub Name: hello Item 2, Field Sub Name: no Item 3, Field Sub Name: yes Item 4, Field Sub Name: what Item 5, Field Sub Name: sure Item 6, Field Sub Name: go Yes is selected, which would be Index 2 (or 3, depends on the way you look at it). I need to know if QuickPDF library can tell me this. Any help would be GREATLY appreciated. |
|
wrightj
Beginner Joined: 07 Jun 10 Status: Offline Points: 6 |
Post Options
Thanks(0)
|
Ok, I made a little progress. While I haven't been able to find a way to see what was selected from the FormField functions, I was able to see in the GetObjectSource() function.
So for my drop-down list, GetObjectSource for its object number returned: << /F 4 /P 10 0 R /T (DropDownList1[0]) /V (go) /AP << /N 97 0 R >> /DA (/MyriadPro-Regular 10.00 Tf 0 g) /FT /Ch /Ff 67502082 /NM (c7fb03b4-cd42-4fcc-80bf275db946258b) /TU (Drop-down List) /Opt [ [ (hello) (hello) ] [ (no) (no) ] [ (yes) (yes) ] [ (what) (what) ] [ (sure) (sure) ] [ (go) (go) ] ] /Rect [ 127.701 706.323 226.913 726.165 ] /Type /Annot /Parent 41 0 R /Subtype /Widget /StructParent 2 >> And obviously /V is my value that is selected (which is correct). Is there an easier way to do this? |
|
wrightj
Beginner Joined: 07 Jun 10 Status: Offline Points: 6 |
Post Options
Thanks(0)
|
One problem with doing it this way:
When a drop-down list contains selectable options but also an empty option where they can type something in and save it, GetObjectSource() DOES NOT have anything for the value. It shows as: /V () Hopefully there is a way around this. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store