The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (Archicad API, BIMx API, BIMcloud API) for independent software developers

Moderators: ejrolon, Barry Kelly, Karl Ottenstein, LaszloNagy, Gordana Radonic, nbalogh, gkmethy, mnguyen, Viktor Kovacs, Mihály Palenik, Tibor Lorántfy, rmasaki, MOREH Tamas, Akos Somorjai, Ed Brown

#328357
I created a palette dialog and use some of the dialog item classes. But these three seems to not work for me.

Palette declaration
Code: Select all
class MyPalette : public DG::Palette,
  // observers
  public DG::CompoundItemObserver
{
  // dialog items
  DG::Separator       m_separatorV;
  DG::Separator       m_separatorH;
  DG::IntEdit         m_intEdit;
  DG::EditSpin        m_editSpin;
  //.. more codes ..

Palette constructor (initial size and position)
Code: Select all
AtdDoorSignCounterPlt::AtdDoorSignCounterPlt() :
  DG::Palette(DG::NativePoint(), 125, 100, m_guid, VGrow, Close, TopCaption),
  m_separatorV(GetReference(), DG::Rect(1, 1, 2, 2)),
  m_separatorH(GetReference(), DG::Rect(1, 1, 2, 2)),
  m_intEdit(GetReference(), DG::Rect()),
  m_editSpin(GetReference(), DG::Rect(0, 0, 10, 25), m_intEdit),
  //.. more codes (including actual size and position of items and Show() functions are called)..


Image
ERR: m_editInt should be m_intEdit in this image

Separator (SOLVED, see comment below)

It seems that DG::Separator only caters vertical separator. As seen on the image above, m_separatorV is okay. But m_separatorH (highlighted by white color) only has left "border". Do I have to do or set values to make it a horizontal line?

Currently, I am using GroupBox as horizontal separator.

EditSpin

The created EditSpin (up/down buttons) does not show. Only the IntEdit is visible.

Currently, I am using SingleSpin and IntEdit. Whenever SingleSpin changes (clicked), IntEdit will be updated; and vice versa.

MultiSelListBox

When a multiple item is selected then SetOnTabItem() is called, the item will only be place on the first selected item in the list. If you are on the last of the list, you will not notice that the item is already set to the tab index. Is there a way to let it be placed on any of the selected items? Like, instead of SetOnTabItem(tabIndex, item) we'll be using SetOnTabItem(listItem, tabIndex, item).

Currently, whenever I call SetOnTabItem() I will also call SetScrollPosition() so that the first selected item will be visible.
Last edited by ReignBough on Mon Jul 19, 2021 2:58 am, edited 1 time in total.