paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [paragui-users] Listbox select and add


From: Andrew Ford
Subject: Re: [paragui-users] Listbox select and add
Date: Wed, 7 Aug 2002 09:36:00 -0700 (PDT)

Thanks Craig,
    I'll take a look when I get a chance.  Eric,
perhaps you would like to try it?

Andrew

--- Craig Thornton <address@hidden> wrote:
> Andrew,
>     Here is the code that works if there are no
> items in the listbox selected. When an item is
> selected and access violation occurs. This happens
> when the function is exited, and the return value
> set true/false doesn't fix it. The variable b tries
> to get the item that is selected and unselect it.
> This doesn't work.
> 
> Craig
> 
> PARAGUI_CALLBACK(nexthandle) {
>  PG_Application *app = (PG_Application *)
> clientdata;
>  PG_LineEdit *s1 = (PG_LineEdit *)
> app->GetWidgetById(100);
>  PG_LineEdit *s2 = (PG_LineEdit *)
> app->GetWidgetById(101);
>  PG_LineEdit *s3 = (PG_LineEdit *)
> app->GetWidgetById(102);
>  PG_ListBox *b1 = (PG_ListBox *)
> app->GetWidgetById(200);
>  string t1 = s1->GetText();
>  string t2 = s2->GetText();
>  string t3 = s3->GetText();
>  string tt = t1+","+t2+","+t3;
>  PG_ListBoxBaseItem *b;
>  s1->SetText("");
>  s2->SetText("");
>  s3->SetText("");
>  b = b1->GetSelectedItem();
>  b1->AddItem(new PG_ListBoxItem(30, tt.c_str()));
>  s1->Update();
>  s2->Update();
>  s3->Update();
>  b1->SelectItem(b, false);
>  b1->Update();
>  return false;
>  }
> 
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]