PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Add Value To A Combo

PointOfLight · 23 Apr 2004, 05:10 UTC
Okay, I'm just playing around with a simple interface (no application in mind, just want to learn PPL). I have created a combo, but I can't seem to put any values into the combo. The code goes something like this:

c$ = NewControl(700, "COMBOBOX", ...
strCombo$ = "First Item";
SendMessage(c$, CB_ADDSTRING, 0, &c$);

I see the combo, but it has no items. Please help!
PointOfLight · 23 Apr 2004, 05:25 UTC
Okay, I figured this one out. I needed to increase the height parameter of the combo when I called NewControl. Am I going to have to adjust the height property based on the number of items I stick in the combo?
PointOfLight · 23 Apr 2004, 05:57 UTC
Okay, I've got 10 items in my list, but when I pull down the list I don't get a scroll bar. I have to pick an item near the bottom of the visible list, at which point when I pull down the list again I will see more of my items. How do I get the scroll bar?
Hi,

Btw, you should pass strCombo$ instead of c$ in the last parameter of your sendmessage.

You don't need to pass the strCombo$ variable as a pointer, PPL knows how to handle strings when used with api functions. You should be passing strings as normal strings, PPL will convert them to WideChar automatically for you.

Code:
SendMessage(c$, CB_ADDSTRING, 0, strCombo$);


As for the scrollbar you need to add WS_VSCROLL to your window's styles.

Code:
c$ = NewControl(700, "COMBOBOX", NULL, "", WS_VSCROLL, form$...


This should add a vertical scrollbar to your combobox.

Regards,
Kornalius
PointOfLight · 23 Apr 2004, 15:05 UTC
Sweet. The scroll bar thing worked like a charm! As for using strCombo$ instead of c$ as the last parameter, that was just a typo on my part.
I will do my best to document these functions in the manual soon.

Regards,
Kornalius
PointOfLight · 23 Apr 2004, 15:43 UTC
If you would like some help with the documentation, let me know. I have already found a couple of issues, and maybe by working together on it we can get it hammered out quicker and make it more useful to others. Let me know!
If you are talking, issues with the program, please post them here or use the beta support email address, I will be more than happy to help and discuss. If it's about docs, then, after the release of 0.2 next week, I will have some time to revise the docs some more.

Regards,
Kornalius
PointOfLight · 23 Apr 2004, 18:21 UTC
I was talking about the documentation. I will just email you what I've found. The offer still stands if you want any help with the documentation, however.
The docs don't need a complete rewrite, but it would help GREATLY if they were accurate. Many of the examples in the docs generate a lot of INVALID # OF PARAMS errors.

P.S. Cool christian site, PointOfLight
PointOfLight · 25 Apr 2004, 02:15 UTC
Thanks, jsjohnson. I wasn't trying to imply that the document needed to be rewritten. He certainly has a very good base going. But you're right about some of the examples. In fact, at least one of them has a function that doesn't even exist! It would also be nice to see an actual function list / explanation instead of having to go to particular sections of the manual in order to see a particular set of functions. I'm one of those people that tends to collect reference books as much as actual instruction books, so something like that for PPL would be great!
Hi,

I wrote this document as I was doing the early development of PPL, a lot have changed during this time and keeping the manual updated all the time was hard. Sorry for the inconveniences. :cry: I tried to make sure everything was right but unfortunately, one man doing the job of 4 is not always easy! :D

I am thinking about writting the docs in a windows help file that can be accessed by the desktop IDE very easily. I will buy the help file builder to the person who can help me write the docs in a clear and complete form. I am also willing to pay for the work or share a small percent on the profits when PPL is going to be released officially. I need something professional looking and accurate!

Regards,
Kornalius
PointOfLight · 25 Apr 2004, 04:31 UTC
Well, I'll get right on it then :) Seriously, though, I really would like to help you get the documents in tip top shape, regardless of compensation. If you seriously want me to help, please just drop me an email. I'd rather know that you're going to work with me on it than that there might be several different people trying to help, because I think that would be a wasted effort on all parts - a "too many cooks" sort of thing. Just let me know!
Hi,

I will be very happy to get your help with the documentation. I have converted it from a Word doc to a Windows Help Format. I will provide the editor to you with the help project file early next week, if we can get our internet back at the office early.

Regards,
Kornalius
I am also willing to help with the documentation in any way I can. (free, of course)