Need help with DI_LISTBOX

A place where plug-in developers can share their knowledge and experience.
Post Reply
pepak
Posts: 330
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 3 times
Been thanked: 9 times

Need help with DI_LISTBOX

Post by pepak » Sun 23 Jul, 2017 15:01

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.

pepak
Posts: 330
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 3 times
Been thanked: 9 times

Need help with DI_LISTBOX

Post by pepak » Sun 23 Jul, 2017 16:02

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).

Shmuel
Posts: 5233
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 16 times
Been thanked: 152 times

Need help with DI_LISTBOX

Post by Shmuel » Sun 23 Jul, 2017 16:59

Here is an .

pepak
Posts: 330
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 3 times
Been thanked: 9 times

Need help with DI_LISTBOX

Post by pepak » Sun 23 Jul, 2017 17:22

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.

Shmuel
Posts: 5233
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 16 times
Been thanked: 152 times

Need help with DI_LISTBOX

Post by Shmuel » Sun 23 Jul, 2017 17:27

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.

pepak
Posts: 330
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 3 times
Been thanked: 9 times

Need help with DI_LISTBOX

Post by pepak » Sun 23 Jul, 2017 17:50

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.

pepak
Posts: 330
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 3 times
Been thanked: 9 times

Need help with DI_LISTBOX

Post by pepak » Sun 23 Jul, 2017 19:10

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.

Post Reply

Return to “Plug-In Developers”