Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Using "wxCheckListBox" in a wizard project
Jenna:
I never worked on scriptedwizard.
Nevertheless I attach a quick patch to imöplement wxCeckListBox-functions for it.
It would be nice if anybody can test it and give feedback.
It works with your test-script (after changing the function calls of course).
LETARTARE:
@jens
after some computer troubles...
I tested the functions :
--- Code: ---wxString GetCheckListboxChecked (const wxString& name)
--- End code ---
and
--- Code: ---wxString GetCheckListboxStringChecked(const wxString& name)
--- End code ---
Both give the desired result.
--- Quote ---LibNumbers ->0;2;4;6;<-
Lib_addOns ->lib_A;lib_C;lib_E;lib_G;<-
--- End quote ---
But I will now check the four functions in more depth.
And continue editing the wizard.
A big thank you first (especially extremely quickly !)
LETARTARE:
@jens
All methods work correctly on my system.
Soon, I will provide a 'wizard.script' example.
To save with 'Config Manager', I would need:
--- Code: --- void SetCheckListboxChecked(const wxString& name, wxString listname);
--- End code ---
--- Code: ---/// LETARTARE
void Wiz::SetCheckListboxChecked(const wxString& name, wxString listname )
{
wxWizardPage* page = m_pWizard->GetCurrentPage();
if (page)
{
wxCheckListBox* clb = dynamic_cast<wxCheckListBox*>(page->FindWindowByName(name, page));
if (clb && !listname.IsEmpty())
{
/// clear checked
unsigned int i;
for (i = 0; i < clb->GetCount() ; i++ )
clb->Check(i, false) ;
/// format listname "1;4;7;"
char sep = ';';
unsigned long pos;
/// checked
while (!listname.IsEmpty()) {
listname.BeforeFirst(sep).ToULong(&pos);
clb->Check(pos, true) ;
listname = listname.AfterFirst(sep) ;
}
}
}
}
--- End code ---
is that correct ?
LETARTARE:
@jens
Is it possible to validate the fix in the svn ?
Because I intend to propose to wizard specialization 'avr' using this fix that works for me correctly.
Thank you in advance
Navigation
[0] Message Index
[*] Previous page
Go to full version