Subj : Slider Problems
To : David Noon
From : Vitus Jensen
Date : Thu Nov 02 2000 05:12 pm
Moin David!
30.10.2000, David Noon wrote a message to Vitus Jensen:
VJ>> There is a slider inside a dialog, the dialog was created via IBM's
VJ>> Dialog Editor (see progress.dlg). The Dialog Editor isn't able to
VJ>> define ticks or scale texts. So I'm doing it by hand (see
VJ>> drverify.cpp). None of the calls fail but the result is ugly:
DN> Are "40" and "80" really justified differently from the others? Those
DN> 2 are right justified and the other tick values are left justified.
DN> Does the justification alternate from one tick mark to the next?
No no. I just had problems doing the correct display in ASCII. All numbers
are centered above their ticks.
DN> Basically, what you want is the text to be right justified on all tick
DN> marks, or at least the last one. If the justification does alternate
DN> left and right, reducing the number of ticks by one might give you
DN> the desired result:
How do you change the justification (on any text)? I searched the
WinSetPresParam() documentation but there is no attribute "justification"
listed.
VJ>> The problem is that the "100" is cut after the first zero. Questions
VJ>> are: why and how do I avoid this? Answers?
DN> Another possible work-around would be to re-label the dialogue as
DN> "Percentage remaining" instead of "Percentage done", and have the
DN> ticks go from 100 down to 0. This doesn't solve the underlying
DN> problem, but is possibly a quick kludge.
DN> Otherwise you are faced with what Udo has said: shorter text
DN> [unlikely], smaller font, or a static text control for your tick
DN> marks' text.
Just crude hacks...
You could also place all ticks by hand (SLM_ADDDETENT) and make sure there is
enough room for "100".