I assume what you're saying is that when you redraw you want to maintain the
selection of whatever was in the first list box.  When you redraw the list,
make sure you LstSetSelection to the selection you got before.

DeAnna

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Bradly
> J. Barton
> Sent: Monday, July 24, 2000 2:51 AM
> To: Palm Developer Forum
> Subject: List Redraw Problem
>
>
> I have a problem that is just slaying me here.. it isn't a
> problem on OS 3.5
> (my IIIc), but it does happen on 3.3... my experience has shown
> me that when
> this happens, I'm doing it wrong :)
>
> Ok.. I have a Modal Dialog with two listboxes. Both of them are
> dynamically
> drawn using custom drawing functions and what appears in LB2 is directly
> related to what is selected in LB1. The problem is when I select
> an item in
> LB1 and redraw the form, the highlight goes all screwball... please help..
> here is a snippet of code that I am using now:
>
> case lstSelectEvent:
>    {
>    switch (pEvent->data.ctlEnter.controlID) {
>    case CoverCategoriesList:
>     {
>      FormPtr pForm = FrmGetActiveForm();
>      ListPtr list = FrmGetObjectPtr(pForm, FrmGetObjectIndex(pForm,
> CoverCategoriesList));
>      Word sel = LstGetSelection(list);
>      if (sel != noListSelection)
>      {
>       SetupCoversList(pForm, sel);
>       FrmDrawForm(pForm);
>      }
>     }
>     break;
>    }
>    break;
>   }
>
> Now the function "SetupCoversList" simply figures out how many
> visible items
> there are supposed to be in the listbox and sets the drawing function.
> (Before anyone asks, I do not use the built-in category feature for this
> list because there could be anywhere from 10 to 100 categories.) I have
> tried using FrmUpdateForm and I have tried returning a true from the event
> handler (to tell the dialog I handled it) and nothing seems to work.. the
> highlight still gets all messed up.
>
> ----------
> Bradly J. Barton - [EMAIL PROTECTED]
> Jenies Technologies Incorporated
> (972) 602-1835
> http://www.JTI.net
> http://PalmInHand.com
>
>
> --
> For information on using the Palm Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to