2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations
2021-06-16
07:46 AM
- last edited on
2021-09-14
09:34 AM
by
Noemi Balogh
I created a palette dialog and use some of the dialog item classes. But these three seems to not work for me.
Palette declaration
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)
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)..
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.
2021-06-23 11:51 AM
m_separatorH(GetReference(), DG::Rect(1, 1, 5, 2)),
2021-09-07 03:41 PM - edited 2021-09-07 03:43 PM
Hi,
1. The dialog Manager decides the type of the separator by comparing the horizontal and vertical sizes of the control.
2. The order of the edit and the editspin control is important. The edit control should be preceeding the spin control which follows it in the resource. In the sample code above the edit control was created with an empty rect.
3. Currently multisel listboxes can have the ontab item only on the first selected row.