Quantcast
Viewing all articles
Browse latest Browse all 3737

SelectRowWithText not selecting a matching row (Desktop Popup)

I have a popup menu that currently has two predefined options. There will eventually be more:

Mono8
Mono16

These values match parameters stored on a frame grabber board. I am reading the value on the frame grabber in the Window’s Opening event, and want to pre-select the correct option from this pulldown.

FrameGrabber.frameBPP = FrameGrabber.CXPGetFGParameter("camera", "PixelFormat") 
//This puts the string "Mono16" into FrameGrabber.frameBPP
var bpp as string = FrameGrabber.frameBPP
//This has the value "Mono16"
puBPP.SelectRowWithText(bpp)

The only reason I’m putting FrameGrabber.frameBPP into a string called bpp is for ease of debugging, so it’s right there when things go awry. Which they do.

When the code above is called, I get an InvalidArgumentException in puBPP.SelectRowWithText(bpp).

I can clearly see right in front of me that the text matches exactly. I even copy/pasted the value I was getting from the frame grabber in the debugger, and replaced the “Mono16” in the IDE’s Inspector for the popup with that text just in case there was something weird (invisible). And I keep getting this. Any ideas?

6 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 3737

Trending Articles