That did it.  My frmOpenEvent handler now looks like this:

                case frmOpenEvent: {    // The form was told to open,
initialize it
                        Word            listIndex;
                        ListPtr     list;
                        
                        // set things up (list draw callback, etc.)
                        MyFormInit();
                        
                        // draw
                        frm = FrmGetActiveForm ();
                        FrmDrawForm (frm);
                        
                        // redraw list to get rid of initial highlighting
problem
                        listIndex = FrmGetObjectIndex(frm, MyFormMainList);
                        list = FrmGetObjectPtr(frm, listIndex);
                        LstEraseList(list);
                        LstDrawList(list);
                        } break;

-- 
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi./sec ... not just a good idea, it's the LAW!


> -----Original Message-----
> From: Sudipta Ghose [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 17, 1999 12:29 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Custom draw list display problem
> 
> 
> How about this, after drawing the form?
> 
> LstEraseList(pLst);
> LstDrawList(pLst);
> 
> -Sugho-
> 
> >From: Richard Hartman <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >Subject: RE: Custom draw list display problem
> >Date: Wed, 17 Nov 1999 10:21:15 -0800
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > >
> > > >How do I get the first item to be highlighted all the way
> > > >across the first time, so that it behaves properly when the
> > > >OS attempts to remove the highlighting?
> > >
> > > How is the first item getting highlighted? Are you setting it
> > > to the list
> > > selection? If so, when?
> >
> >Originally I had not been setting an initial selection, but
> >the first item had been close-highlighted as I described.  Then
> >I tried setting the initial selection in the InitForm routine,
> >with no difference in the result.
> >
> >The previous suggestion (by Steve Sabram) of calling 
> WinEraseRectangle()
> >has gotten rid of -most- of the problem.  Now the highlighting
> >to the right of the text is proper, but there's still a bit of
> >junk to the left of the 1st after selecting a second.  Instead of
> >
> >        |[]ITEM 1[               ]|
> >        |[ ITEM 2                ]|
> >        |  ITEM 3                 |
> >
> >it's now this
> >
> >        |[]ITEM 1                 |
> >        |[ ITEM 2                ]|
> >        |  ITEM 3                 |
> >
> >Good enough ... but it'd still be nice to get rid of that last
> >bit of "dirt".
> >
> > > >btw: is there any way to determine, when your list item drawing
> > > >callback function is called, whether it is drawing a highlighted
> > > >item or a "normal" item?  It seems as if the OS must set up the
> > >
> > > Not that I'm aware of. That's taken care of for you.
> > >
> > > I remember having this problem quite a while ago. I think the
> > > answer might
> > > be to draw the full list and then set the selection (then
> > > maybe redraw the
> > > list just in case).
> >
> >Force a redraw -- I'll try that, thanks.
> >
> >--
> >-Richard M. Hartman
> >[EMAIL PROTECTED]
> >
> >186,000 mi./sec ... not just a good idea, it's the LAW!
> >
> >
> >
> 
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
> 

Reply via email to