Page 1 of 1

Need help with DI_LISTBOX

Posted: Sun 23 Jul, 2017 15:01
by pepak
Hi! I would very much appreciate if someone could give me a brief overview on how to create a listbox and fill it with data. The Encyclopedia is very sketchy here, which added to my lack of knowledge of Russian leads to my total incomprehension of the process. I tried to find a plugin I could use as an example, but it seems the only two plugins which actually use listboxes (MacroView and NewArc) are quite old (possibly obsolete) and certainly don't seem easy to understand :-(. Thanks.

Need help with DI_LISTBOX

Posted: Sun 23 Jul, 2017 16:02
by pepak
For the moment, I am giving up. I tried to create a simple listbox with a few fixed items, but without success. The listbox almost certainly exists because I am able to move the cursor to it (and then back), but the listbox itself isn't visible - I just see the gray background of the underlying dialog. I am afraid I won't be able to move forward without some basic explanation of the workings of the listbox (or, preferably, a tiny demo of a working code).

Need help with DI_LISTBOX

Posted: Sun 23 Jul, 2017 16:59
by Shmuel
Here is an .

Need help with DI_LISTBOX

Posted: Sun 23 Jul, 2017 17:22
by pepak
Thanks. I will see what I can do about transforming it to a C-like language. Offhand, it seems that it doesn't do anything else than my own code does, except that I opted for a simple static list with no DialogProc.

Need help with DI_LISTBOX

Posted: Sun 23 Jul, 2017 17:27
by Shmuel
pepak, you can run this code in Far. For instance, you can place the entire contents as the body of action function of a macro.

Need help with DI_LISTBOX

Posted: Sun 23 Jul, 2017 17:50
by pepak
I know. Unfortunately, id didn't help me with the problem of my code not running yet. I need to figure out what you are doing differently than I am, because your code works and mine does not.

Need help with DI_LISTBOX

Posted: Sun 23 Jul, 2017 19:10
by pepak
Got it. Had a typo in my code: Instead of setting Y1 and Y2 to distinct values, I set them both to the same value. I still don't feel quite comfortable using the listbox, but I am getting there.