Author Topic: Custom Dialog Box  (Read 491 times)

quackerjeff

  • Community Member
  • Posts: 11
  • Hero Points: 1
Custom Dialog Box
« on: April 09, 2012, 11:02:09 PM »
Hey fellow Slickers,

Has anyone created a custom dialog box without the form editor?  I have a need to create a
dialog box where it contains a list of tree lists.  Each item in the tree list contains a check box and label. 

Any ideas how to get started on this? 

Thanks!

Graeme

  • Community Member
  • Posts: 1338
  • Hero Points: 154
Re: Custom Dialog Box
« Reply #1 on: April 10, 2012, 12:46:30 PM »
Hey fellow Slickers,

Has anyone created a custom dialog box without the form editor?  I have a need to create a
dialog box where it contains a list of tree lists.  Each item in the tree list contains a check box and label. 

Any ideas how to get started on this? 

Thanks!

Why do you need to do it without the form designer?

What does a list of tree lists look like?

You'll probably have to hunt through the slick C sources looking for examples and experiment.

If you go to tools -> options -> import/export -> "setup export groups", you'll see a treeview where each item in the tree contains a checkbox and a label.  Also in the GNU C options dialog you'll see GNU C warning options presented with a tree of checkboxes.

The code relating to "setup export groups" is in optionsxml.e and OptionsTree.e   - but it's hard to follow.

The code relating to the GNU C options dialog you can find by searching the slickedit installation macros folder for ctlWarningsTree.  In gnucopts.e you'll see oncreateWarningsTree where it calls _TreeSetListFromArray  - which calls _TreeAddItem.  Just below the _TreeSetListFromArray function  you'll see the _TreeSetCheckboxValue function  - which has _pic_treecb_checked, _pic_treecb_unchecked etc.  Search slick sources for these and you'll probably find other examples.

A tree_view has a property called p_CheckListBox (it's not mentioned in the help on tree view properties) which I suspect is what you need to enable to get the checkboxes shown in the treeview.

So try creating a treeview and populating it using _TreeAddItem etc and see what it looks like.


quackerjeff

  • Community Member
  • Posts: 11
  • Hero Points: 1
Re: Custom Dialog Box
« Reply #2 on: April 10, 2012, 01:01:52 PM »
Graeme,

The export groups tree is a perfect example of what I need to do.
I will try to see if I can walk through that code.

Jeff