Experience in creating user controls

C and PASCAL (or any other high-level languages) in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
MadDonna
Captain Atari
Captain Atari
Posts: 478
Joined: Thu Sep 16, 2004 2:13 pm
Location: Alkmaar, The Netherlands
Contact:

Experience in creating user controls

Postby MadDonna » Wed Oct 12, 2005 12:13 pm

I want to create a custom listbox and a treeview, anyone experience in creating user controls?
1 Atari 520ST, 1 Atari 1040STf, 1 Atari 1040 STfm, 2 Atari 1040 STe, 2 Atari Mega 1, 1 Atari Mega ST 2, 1 Mega STe, 1 Megafile 30, 1 Megafile with an IBM 1Gb replacement, 2 Atari TT030 and 1 Falcon
Image

Sarek
Captain Atari
Captain Atari
Posts: 374
Joined: Sat Nov 20, 2004 12:30 pm

Postby Sarek » Sat Oct 15, 2005 11:18 am

By "custom", am I to assume you mean making these objects from text and graphics?

If so, listboxes are relatively easy, you begin with a string array [0-L] for your entries, and an index integer to point to the first string entry that is to be on show. A series of N text lines show the N entries beginning at the pointer. The index (and slider) can move between 0 and L-N. Obviously if N>L, then there are more text lines than entries to show. This needs special handling.

Treeviews are more complex, and can be made in two ways: Linearly, by using an expanded tree with a "depth" reference for each entry. Or Referentially by making each node point to another vector where it's subtree is stored. The highest depth nodes are listed first, then depth two and so on. Both methods have advantages and disadvantages depending upon updating, retrieval, and the database size.

May I ask what it is for, how big, and how might it need to be manipulated?

User avatar
MadDonna
Captain Atari
Captain Atari
Posts: 478
Joined: Thu Sep 16, 2004 2:13 pm
Location: Alkmaar, The Netherlands
Contact:

Postby MadDonna » Sat Oct 15, 2005 1:23 pm

I am searching for two usefull projects for the Atari C course I am creating. One simple and one complex so that the persons who are following the course end up with usefull experience in writing C programs on the Atari, and it must be an usefull extension in what is already here.
And in the end if everything is ready they have build there own ide for creating c programs. And in the IDE some things I miss in the already existing IDE's, a real project window, like that in visual studio and c++ builder.

So that is where I need it for, and it will not be really big.
1 Atari 520ST, 1 Atari 1040STf, 1 Atari 1040 STfm, 2 Atari 1040 STe, 2 Atari Mega 1, 1 Atari Mega ST 2, 1 Mega STe, 1 Megafile 30, 1 Megafile with an IBM 1Gb replacement, 2 Atari TT030 and 1 Falcon

Image

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2324
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: Experience in creating user controls

Postby lp » Sat Oct 15, 2005 8:48 pm

MadDonna wrote:I want to create a custom listbox and a treeview, anyone experience in creating user controls?


For an extremely easy listbox, just use the AES function menu_popup() with the scroll option. :lol:

Sarek
Captain Atari
Captain Atari
Posts: 374
Joined: Sat Nov 20, 2004 12:30 pm

Postby Sarek » Mon Oct 17, 2005 6:09 pm

well for versatility and educational merit, which I think is what's important here, the relational structure is best, but is more difficult to code.

But to get something up and running quickly, and less plagued with bugs, I'd suggest the linear format.

Listboxes should cause you no problems. There is little else to them other than what I have already explained.


Social Media

     

Return to “C / PASCAL etc.”

Who is online

Users browsing this forum: No registered users and 5 guests