Hello dear DXL developers,
I have a problem in my code that makes the scrollbar not working.
My code has a DB box that contains a checkbox of large size.So i need to scroll the page up and down to have all the checkboxes.
So the solution that came to my mind was to have a scrollbar.It needs a canvas so i added it to the "box".
The scrollbar is not moving throw the arrows i can drag it but the screen stands still without the known effectof the scrollbar.
here is my code I hope anyone can help :)
******************************************************
testGroupBox = create "Choose test groups you want to export"
DBE art = canvas(testGroupBox, 250, 0, doDrawing) //doDrawing is an empty function as i don't want to draw
void cb(DBE canv,ScrollEvent Event,ScrollSide scrollBar,int newPos,int oldPos) {
}
scrollSet(art, horizontal, 100, 5, 0)
scrollSet(art, vertical, 100, 5, 0)
hasScrollbars(art,cb)
filesCheck = verticalCheckBox(testGroupBox, "Test Groups:",files_names,0)
button(testGroupBox, "Ok", CheckBoxButtonHandler)
show testGroupBox
}
DXL - Tue Nov 24 09:57:21 EST 2009 |
Re: Scrollbar is not scrolling! Mathias Mamsch - Tue Nov 24 15:19:45 EST 2009
I am afraid, scrollbars in DOORS are not for scrolling :-)
At least not your dialog! You can use them in a canvas to control the layout of your display, but even then you would have to implement the scroll functionality from scratch (i.e. shifting your contents around).
In addition I know no way of drawing a GUI element to a canvas, so I guess you are out of luck with 'scrolling dialogs'. However there are some ways to avoid huge dialog windows:
-
don't use checkboxes to display a huge amount of data (i.e. object text data or something). This will make you dialog grow endlessly. --> instead use a list view with checkboxes (which can scroll!).
-
use tab controls whenever your dialog gets too crowded
-
you can also use sub-dialogs, which open with the press on a button, if necessary.
Regards, Mathias
string filenames[] = {"some very long filenames",
"some more file names", "a veryyyyyyy long name ..........." }
DB testGroupBox = create "Choose test groups you want to export"
DBE filesCheck = listView(testGroupBox, listViewOptionCheckboxes, 400,10, filenames)
void CheckBoxButtonHandler (DBE) {}
button(testGroupBox, "Ok", CheckBoxButtonHandler)
realize testGroupBox
insertColumn(filesCheck, 0, "Filename", 400, iconNone)
show testGroupBox
|