List Box view
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 07:00, xxxxxxxx wrote:
Right, the id is that of the ComboBox. The subid is the id of the item to add (each item must have an id for reference). The name is the text that will be displayed.
You think the COFFEE docs are bad, try XPresso!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 07:12, xxxxxxxx wrote:
But I simply want to add strings to the List View. What is the ID of the item? How can I set it? I'm typing:
AddItem(SCRIPT_LISTBOX,0,"Test1");
But nothing is showing.
Rui Batista
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 07:33, xxxxxxxx wrote:
Whatever you want the ID to be (as long as the IDs don't collide with those already used in the dialog - must be unique in that sense). I usually start a set of dialog IDs (for gadgets) at a certain number, 4000 or 5000. You can enum-erate them. You can declare a starting number for the ComboBox items (if they are to be variable) and add to that as you add to the list:
ID_CB_BASEITEM 5001 for (each item in list x) AddItem(SCRIPT_LISTBOX,ID_CB_BASEITEM+x,string[x]); // or enum { ID_CB_TEXT1 = 5001, ID_CB_TEXT2, ID_CB_TEXT3, // etc. } AddItem(SCRIPT_LISTBOX, ID_CB_TEXT1, "Text 1"); AddItem(SCRIPT_LISTBOX, ID_CB_TEXT2, "Text 2"); // etc.
or something similar.
Make sure that you add items after you LoadResource()/AddComboBox(). The ComboBox must exist before you can AddItem()s to it.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 07:52, xxxxxxxx wrote:
Well, I'm using a List View, not a ComboBox but I believe it should be the same. And, after doing, for example...
AddItem(SCRIPT_LISTBOX, 5001, "Text 1");
I get no error, but I also still have an empty List View box. I'm making the AddItem command in the Init of my dialog. Is it the correct place?
Rui Batista
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 08:08, xxxxxxxx wrote:
Oh, Robert, about the Xpresso documentation, I know it is "slim". Luckily I "assisted" to the whole development of Xpresso so, I have not much problems with it
But COFFEE... we should really get better docs. Sometimes I'm forced to go to the C++ docs and extrapulate. Oh, and LOTS of trial&error; testing.Rui Batista
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 09:08, xxxxxxxx wrote:
How are you adding a ListView (don't see it in the docs)? Is this a MultiLineEditText? I don't use ResEdit often - only in those sticky situations where grouping doesn't seem to be right.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 09:14, xxxxxxxx wrote:
Adding? I simply defined it in Resedit so it appears when I load my dialog. The dialog is like this:
http://www.ruimac.com/images/decaf01.gif
And the List View is the rectangle above the "Refresh list" button.
Rui Batista
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 10:01, xxxxxxxx wrote:
Right, but is a ListView the same as a MultiLineEditText? Nope, it isn't after checking. But there is no ListView in the COFFEE docs (whatsoever). I did a text search on the entire HTML docs and nada.
With that in mind, you are back to T&E; or maybe checking the latest docs to see if they included it in there. Or complaining about it - ResEdit can be used for both COFFEE and C++ dialog resources, so COFFEE either supports ListView or it doesn't.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 10:46, xxxxxxxx wrote:
Exactly, Robert.
The problem is that... this is the place to complain about it, isn't it?
And, since no one else is shinning a light on it, I don't know where else should I direct my complains to.
The C++ resorces are way more complex as I have to have a BaseContainer for the internal ListView layout and another BaseContainer for the items to add to the ListView.
Come on, I simply want to add strings to a list. How complex could this be?
Oh, and thank you very much for your help, so far, Robert.Rui Batista
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 11:09, xxxxxxxx wrote:
Rui, thanks for the compliment.
If AddItem() is not working, then I don't know if there is a way to do it programmatically in COFFEE. As you say, the ListView class in C++ has similar methods to ComboBox in COFFEE but utilizing BaseContainers, but there is no ListView class in COFFEE, so there's no way to connect the dialog element to your code. There isn't even a way to add a ListView to a dialog from within COFFEE (except through a dialog resource, obviously).
You could experiment with different SetXXX() methods using the ListView ID and see if something gets through. I checked on BaseContainer, but there are a limited set of classes (none dialog related) which Set/Get them.
My only other suggestion is to try a scrollable group with one column (rows, that is) of text buttons. Then use LayoutFlushGroup() and LayoutChanged() to append/insert/remove list 'items' (i.e.: text buttons). This would be similar to the C++ example that creates a DynamicGroup.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 11:17, xxxxxxxx wrote:
Maybe thats the way to go, Robert. I will try it tomorrow (its already late here and I must go home). I'll let you know of my (in)success
Rui Batista
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 11:46, xxxxxxxx wrote:
Hi,
listviews are not supported in COFFEE afaik. It´s a customdatatype that cannot be access via COFFEE.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 13:57, xxxxxxxx wrote:
That's why I suggested a dynamic scrollgroup with buttons. There is no other way to get 'text' in there without borders, but still have clickable 'text'. This is not as pretty, but it beats designing a ListView interface within a GeUserArea!
And, just to let you know, Rui, it does work. The question is how you are adding/removing items from the list. With Buttons there are some things to consider: no multiselect, select equals whatever action is going to be done will be done immediately, removing buttons (items) might require that you initiate a state, then click on buttons to remove them and then change the state. If you can figure out a way to receive messages when a StaticText is click over, you can make it more like a ListView, but it will require more support.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 14:41, xxxxxxxx wrote:
That means I will have to rethink my whole layout and philosophy
But I guess that is the way it will have to be. Darn! COFFEE is so limitedRui Batista