I thought he was setting the loc or something...
lockLocation top of graphic "line" ??
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: lockLocation top of graphic "line" ??
AHA!
I thought he was setting the loc or something...
I thought he was setting the loc or something...
Re: lockLocation top of graphic "line" ??
AWE! Makes sense! DUH!jacque wrote:You're creating a graphic with a negative width. Those draw as lines. They used to disappear entirely, so in some ways that's an improvement.
The handler should calculate the actual width for the display bar and then set its position on the graph. Widths have to be positive numbers.
Re: lockLocation top of graphic "line" ??
Hmmm.
Surely Jacque is right about that, but where in the thread is it written that you are setting any widths? I only see setting rights and lefts.
Anyway, if what she has psychically discovered is true, you have your answer.
Craig
EDIT. Oh, I see it now. A field in your stack (not any code) sets the width of the graphic. It is always a good idea to label the functionality of these things.
Surely Jacque is right about that, but where in the thread is it written that you are setting any widths? I only see setting rights and lefts.
Anyway, if what she has psychically discovered is true, you have your answer.
Craig
EDIT. Oh, I see it now. A field in your stack (not any code) sets the width of the graphic. It is always a good idea to label the functionality of these things.
Re: lockLocation top of graphic "line" ??
I didn't look at the stack, the clue was in this code fragment:dunbarx wrote:Oh, I see it now. A field in your stack (not any code) sets the width of the graphic.
Code: Select all
if tBlue2 < 0 then
set the right of graphic "bar3" to the left of graphic "Line2"Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: lockLocation top of graphic "line" ??
Jacque.
I learn that way as well.
But he didn't say that the left of a particular control was 10 and its right was then set at -33, he set the right of one control to the left of a different control. Of course if that field value set the right of a control to a value to the left of its left, it would do just that, make a line.
This only means that you are much more clever than you thought.
Craig
I learn that way as well.
But he didn't say that the left of a particular control was 10 and its right was then set at -33, he set the right of one control to the left of a different control. Of course if that field value set the right of a control to a value to the left of its left, it would do just that, make a line.
This only means that you are much more clever than you thought.
Craig
Re: lockLocation top of graphic "line" ??
Actually, setting the right of an object or the left of an object simply moves an existing object and doesn't change its size. Like setting the left of button 1 to the left of this card just moves it to the edge of the card. You would actually have to set the width of the object or change the rect of the object to end up at a negative width.
Having said that, if the line is being created elsewhere (it must be), and set to a negative width, you're still right on the money. Always using abs() when setting up the graphic would solve it easily.
If that is NOT the case, and its working in a group with the locloc set, chances are that the rest of the bar is outside the rect of the group, and thus not showing. An easy way to visually see if this is the case would be to turn on the scrollbars for the group and scroll it around.
Having said that, if the line is being created elsewhere (it must be), and set to a negative width, you're still right on the money. Always using abs() when setting up the graphic would solve it easily.
If that is NOT the case, and its working in a group with the locloc set, chances are that the rest of the bar is outside the rect of the group, and thus not showing. An easy way to visually see if this is the case would be to turn on the scrollbars for the group and scroll it around.
Re: lockLocation top of graphic "line" ??
Urf. I had a thinko. You're all correct of course about setting one side only. I recognized the symptom and my mind short-circuited, connecting "right" to "item 3 of the rect". I need to take myself in for an overhaul.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: lockLocation top of graphic "line" ??
Thinko?
Is that like a brain fart?
Craig
Is that like a brain fart?
Craig
Re: lockLocation top of graphic "line" ??
I thought it was like "think or thwim" ThinkO for short.
Re: lockLocation top of graphic "line" ??
Like typo is short for typographical error. Thinko is short for thinkographical error.
Re: lockLocation top of graphic "line" ??
Ok. I'm stealing that. I thinko quite often.
Re: lockLocation top of graphic "line" ??
Yes, but on a much higher level.Is that like a brain fart?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: lockLocation top of graphic "line" ??
The longhand (thinkographical error) is ever so cromulent.

