Hi,
I am trying to modify the P3Speller application so that after a row or column is intensified, the background color of the row/column changes in the speller display. I was wondering how I can find the row/column that was just flashed and iterate over the TextStimulus objects in that row/column to change the background colors.
Thank You.
P3Speller: Changing background color of intensified row/col
Re: P3Speller: Changing background color of intensified row/
Hi,
if you have the current stimulus code, you can use Associations()[stimulusCode].Stimuli() in order to access the current set of stimuli, which contains pointers of type Stimulus*. Iterating over all entries in that set, you can use dynamic_cast<>() to test whether the stimulus is a text stimulus, and manipulate it then. The cast is used as follows:
HTH,
Juergen
if you have the current stimulus code, you can use Associations()[stimulusCode].Stimuli() in order to access the current set of stimuli, which contains pointers of type Stimulus*. Iterating over all entries in that set, you can use dynamic_cast<>() to test whether the stimulus is a text stimulus, and manipulate it then. The cast is used as follows:
Code: Select all
Stimulus* pStimulus = ...
TextStimulus* pTextStimulus = dynamic_cast<TextStimulus*>( pStimulus );
if( pTextStimulus )
{
... // manipulate TextStimulus properties
}
Juergen
Who is online
Users browsing this forum: No registered users and 19 guests