Listbox in multipage dialog
| Wed, 2005-02-09 14:56 | |
|
How can I add a page containing a listbox to a multipage dialog? Adding this form to the pages results in an EIKON-FORM 0: Code: RESOURCE FORM xxx { items = { DLG_LINE { type = EEikCtListbox; id = EListboxId; control = LISTBOX { flags = EAknListBoxSelectionList | EAknListBoxIncrementalMatching; array_id = r_empty; }; } }; } While adding this dialog page results in no errors but the listbox will not appear with the initial items and items cannot be added to it at all later. Code: RESOURCE DIALOG xxx { flags = EAknDialogSelectionList; items = { DLG_LINE { type = EAknCtDoubleListBox; id = EListboxId; control = LISTBOX { flags = EAknListBoxSelectionList; array_id = r_empty; }; } }; } RESOURCE ARRAY r_empty { items = { LBUF { txt = "\taaa"; }, LBUF { txt = "\tbbb"; }, LBUF { txt = "\tccc"; } }; } Bye, Gábor Bye, |
|






Forum posts: 683
I have several edwins, time and duration control as well as a list box on the form. Now I have (as you do) just dummy objects inserted from the resource file to the list, the plan is to insert the items dynamically. You say that this cannot be done?!?!
Also I have the problem that the standard S60 form system (when starting the editing of the form) adds menu items like Add record, Edit label etc. to the menu, which are totally unappropriate in my situation. I have a fixed set of items the user can edit. Do you know how to get rid of these menu items??
All in all, I'm quite tired of the way S60 limits the usage of dialogs (the standard eikon dialog (CEikDialog descendants with EIKON/UIKON controls) looks totally horrible, AVKON query dialogs can be only max two control dialogs, and the forms "automate" things out of my control). And counting the "quality" of the documentation.... How are you supposed to know how to change all this automatic stuff out of my forms? Do I need to create just CCoeControl or AVKON view based views and create the controls manually, without using resource files and forms or what?!?!
I'm just fed up with this. UIQ at least is better documented and better conforms to the standard eikon/uikon UI components and libraries... UIQ adds it's own look and feel to the controls so that they look UIQ -like, but you still can use them. Just use UIQ specific controls where the EIKON/UIKON does not provide one. S60 either does not let you use the controls at all or makes them look totally ugly. Forces you to use the AVKON, which then is, as I said, poorly documented and "automates" things as the AVKON form does with menu items etc.
Have I just missed something or is this really what this is with S60 UI stuff? Maybe I'm just tired and should get some rest before trying again...
Forum posts: 683
Edit: I found the class CAknPopupFieldText (or similar) which seems to be using some kind of list box descendant akn class as a protected member, so if you inherit from this, you might perhaps be able to somehow use the pop up control as a listbox and and dynamically new items to it. Or does someone has a better idea...?
{
type = EAknCtPopupFieldText;
prompt = "File";
id = EFileControl;
itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
control = POPUP_FIELD_TEXT
{
popupfield = POPUP_FIELD
{
width = 3;
};
textarray = r_dummy_array;
};
}
Forum posts: 112
No, what I'm saying is that with the resources I quoted, it doesn't work. I don't have problems with putting a listbox into a single dialog and using that (to add things dynamically, you just get its model and text array, you can find the details in the ListBox example coming with the SDK).
My problem is that instead of a standalone dialog or a standalone form that works all right for me, I would like to combine them into a multipage dialog and this is where I'm stuck.
Bye,
Gábor
Bye,
Gábor
Forum posts: 112
1. The most basic question: can I use a dialog as a page of a multipage dialog? The documentation and the name in "RESOURCE ARRAY pages" suggests a form but the compiler accepts a dialog as well. Consider this one:
flags = EAknDialogSelectionList;
items = {
DLG_LINE {
type = EAknCtDoubleListBox;
id = EListboxId;
control = LISTBOX {
flags = EAknListBoxSelectionList;
array_id = r_empty;
};
}
};
}
RESOURCE ARRAY r_empty {
items = {
LBUF { txt = "\taaa\t1\t"; },
LBUF { txt = "\tbbb\t1\t"; },
LBUF { txt = "\tccc\t1\t"; }
};
}
It works all right if used in a standalone dialog but doesn't as a page of a multipage one (the default values are not displayed and the listbox cannot be manipulated later, any attempt to get the model and text array results in a KERN panic).
2. If the answer to the previous question is no, how can I modify the dialog into a form so that it will be accepted as a page in a multipage dialog? I tried the following but all I got was an EIKON-FORM 0 panic:
items = {
DLG_LINE {
type = EEikCtListbox;
id = EListboxId;
control = LISTBOX {
flags = EAknListBoxSelectionList | EAknListBoxIncrementalMatching;
array_id = r_empty;
};
}
};
}
Thanks,
Gábor
Bye,
Gábor
Forum posts: 112
Bye,
Gábor
Bye,
Gábor
Forum posts: 10
I am still fighting this problem. What was meant in the previous entry by adding "lines" item into the dialog definition?
I thought that a "form" or "pages" replaced the "items" entry in a dialog structure.
Thanks for any help
John Read
NewNet Marketing
Munich, germany