No announcement yet.

Basic questions with combo boxes

  • Filter
  • Time
  • Show
Clear All
new posts

    Basic questions with combo boxes

    For a toolbar-like modeless window with a hight of only 30 pixels for a filter tool, i need some advice on how to install in spite of space four combo boxes, one exacty over the other in an internally managed hierarchical structure. This means that i have to arrage which one of the four is visible in a certain situation. One of them is the main box on start of the dialog. It contains items which are subtitled in the other three boxes. So, when user clicks on an item in the main box, it is currently shown in it's text input area. Ok so far. But now, the box is in dropped down state, and I have to elimit the drop down part with

    SendMessage hMain, %CB_SHOWDROPDOWN, 0, 0

    In this moment, the dropdown part of the sub box should be opened with

    SendMessage hSub1, %CB_SHOWDROPDOWN, 1, 0

    But the text input part of hSub1 should remain unvisible as well as those of hSub2 and hSub3, at least as long as no item is selected in the sub box. only in this case the sub box gets top level. Remember that I cannot use list boxes here, because the hight of the horizontal dialog strip ist to small. Well, I could subcalss the combo, but this is not my favorite.

    When user manually clicks on a special item in the main combo, the correspondent sub box opens and offers sub items to be chosen, whereas the text area of the main box remains present on top of all. Now user can klick on one of the sub items. Then, the sub box gets top level and the item is shown in it's text area.

    In auto mode user klicks on an item in the graphic window. The correspondent main combo opens and shows the selected item in it's text area, wherease it's dropdown part is invisible. When the selected item in the graphic is a sub item of an item in the main combo, then the sub combo gets top level. The selected item is shown in it's text area.

    User will be able to select garphical data and to see for instance the radius value of a circle, it's line type, line width, it's color, layer and so on. Then, he is able to search for entities in the graphic with just these data. On the other hand, user can manually input data after he has selected the item to be searched for in the dialog hierarchy.

    The logical part of this machinery is ready, but I'm not shure which method to choose for handling the view of the combo boxes.
    The same will happen with text boxes for input and to show parameters of automatically gained graphical data.

    I don't need code, only an advice where to find a similiar concept.
    Norbert Doerre


    "Problem" is solved!
    I reduced my whishes to simply hiding/showing the combos depending from the program's conditions, not using their text I/O areas to serve as information for the succeeding sub combos but instead adding a label like the following with an ID, so that it's caption can be changed from case to case.

    Control Add Label, hDlg, %ID_lblObject, "Object:", x1, y1, x2, y2
    The label then can be changed with Control Set Text.....
    Norbert Doerre