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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Drop-downs and List Boxes
  FAQ FAQ  Forum Search   Register Register  Login Login

Drop-downs and List Boxes

 Post Reply Post Reply
Author
Message
wrightj View Drop Down
Beginner
Beginner
Avatar

Joined: 07 Jun 10
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote wrightj Quote  Post ReplyReply Direct Link To This Post Topic: Drop-downs and List Boxes
    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.
Back to Top
wrightj View Drop Down
Beginner
Beginner
Avatar

Joined: 07 Jun 10
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote wrightj Quote  Post ReplyReply Direct Link To This Post Posted: 22 Jul 10 at 10:55PM
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?


Back to Top
wrightj View Drop Down
Beginner
Beginner
Avatar

Joined: 07 Jun 10
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote wrightj Quote  Post ReplyReply Direct Link To This Post Posted: 22 Jul 10 at 10:58PM
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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store