What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » General Help with Interfaces

Pages: (2): « First « 1 [ 2 ] Last »
General Help with Interfaces
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: General Help with Interfaces
In normal programs this isn't directly possible either; the listview control (in report mode) simply doesn't directly support this.

However, it is always done by displaying an editbox control (or combobox control or whatever else is needed as 'input' control) over the field you want to edit and filling this editbox with the value of the field. After you've done editing the editbox control is removed (hidden).

But as you can guess this requires some calls to the listview to get the exact column and row position (to be able to know where to display the editbox), and some callbacks.

The stuff you need for this isn't completely supported by Plus!, unfortunatly. There are some workarounds, but they are dodgy and have other disadvantages/shortcommings.

It would be very cool if Patchou could make it directly supported in Plus! of course. Even just adding the ability to use proper callbacks would solve it from what I remember from my trials with this (but then you still need to do the job yourself of course; but it would make it possible).

;)

PS: in the mean time you can always use the listview to display your stuff, and for editing it make a (fixed) row of several editboxes below the listview. Each time the user clicks on a field in the listview, the row of editboxes is filled with the values of that listview row. And the user can then edit the values it in that way.

-----------------------

EDIT: Vikke's suggestion is exactly the same as mine. The only difference is that his suggestion involves an extra window, whereas I said you can add it below your listview in the very same window (=more user friendly IMHO):

+-------+-------+-------+-------+-------+
| title1| title2| title3| title4| title5| <== listview control
+-------+-------+-------+-------+-------+
|       |       |       |       |       |
|       |       |       |       |       |
|       |       |       |       |       |
|       |       |       |       |       |
|       |       |       |       |       |
|       |       |       |       |       |
+-------+-------+-------+-------+-------+
.+-----+ +-----+ +-----+ +-----+ +-----+.
.|     | |     | |     | |     | |     |.  <== editboxes, one per column
.+-----+ +-----+ +-----+ +-----+ +-----+.


When the user highlights a line in the listview, the cells are filled in in the editbox. When the user clicks in an editbox the row in the listview stays highlighted (this is a property of the listview which you can set) and he can edit the value. As soon as the focus is lost from a specific editbox, that value is copied back to the proper cell in the listview. In this way: no need for an extra window with the same labels, more buttons, etc. It enables quicker editing (if that is what you want of course).

It is just a matter of design, of where to place the editboxes. The method is exactly the same: using a row of editboxes. In both cases you don't need any scrollbars though. PS: you can move controls on windows on the fly. This means that you can even make your editboxes grow or shrink according to the column widths of the listview in case you have dynamic column widths.

;)

This post was edited on 12-01-2007 at 11:59 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
12-01-2007 02:11 PM
Profile PM Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: General Help with Interfaces
ListViews in Windows aren't made to be editable. I bet that's why Patchou hasn't included it in the MP!L scripting, it's simply too much work with dirty workarounds. You can always create a separate window where you store each value in a editbox, so the user can edit it from there. I would have done that if I needed the items to be edited.

As said, it's not supported by the Win32, and I personally think it's not going to be added into MP!L. However what I would like to see is callback functions (so we can do stuff like this with subclassing). That would be even better! :)
12-01-2007 02:38 PM
Profile E-Mail PM Find Quote Report
Crazed
New Member
*

Avatar

Posts: 12
33 / Male / Flag
Joined: Nov 2007
O.P. RE: General Help with Interfaces
Thanks for all the help and interesting opinions, guys. :) I admit I had thought about dynamically editing the XML page onthe fly, but that seems drastic to me. I would try to cheat out the API a bit, but as this is my first time truly working with it, I think I'll take it easy.

For now, I think I'll try to go with Vikke's suggestion and create a small window with a few edit boxes for each statistic. That will also solve the problem of needing a scrollbar or something for a whole thing of ListViews.

Thanks so much for all your help! Hopefully I'll be posting soon, releasing this tool. :) Please let me know if there's any other help you can offer.

This post was edited on 12-01-2007 at 06:50 PM by Crazed.
12-01-2007 06:11 PM
Profile PM Web Find Quote Report
Toneo
Junior Member
**

Avatar
Epic.

Posts: 35
Reputation: 2
29 / Male / Flag
Joined: Jul 2007
RE: General Help with Interfaces
Cool. I'll look forward to when you release it!
If you want any more help, just ask.
[Image: signature-user=291&back=4&clr=12,102,237&size=80.png]
12-03-2007 04:17 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On