Thanks for the cursor fix! It works fine now.
Is there a way to make WriteText not add end ellipsis when using DWRITE_WORD_WRAPPING_NO_WRAP?
I'm rewriting my search bars and in jscript2 I could play around with no end ellipsis and text alignment to make the text align to the right when the string is longer than the search bar, but in jscript3 it adds ellipsis and it becomes confusing.
I'm not sure if I can explain it properly, but the text is not being pushed to the left when I set it to align right, it does align it but when it becomes bigger than the text box, it just adds ellipsis to the overflowing text.
Pictures and code to make it clear:
JScript2:
var inputWidth = gr.CalcTextWidth(this.input, FONT);
if (inputWidth > this.w - this.h - 10) {
var inputAlign = 0x00000826;
} else {
var inputAlign = 0x00000824;
}
gr.GdiDrawText(this.input, FONT, this.color, this.x + 10, this.y, this.w - this.h - 10, this.h, inputAlign);
this.InputWidth = utils.CalcTextWidth(this.Input, "Lato", panel.FontSize, 700);
if (this.InputWidth > this.W - this.H - 10) {
this.InputAlign = 1;
} else {
this.InputAlign = 0;
}
gr.WriteText(this.Input, this.Font, this.Color, this.X + 10, this.Y, this.W - this.H - 10, this.H, this.InputAlign, 2, 1);
Is CalcTextWidth trimming the input? Because when I write a space character in the search bar, it does not move the cursor to reflect the space character until I write any other character, which wasn't the case in jscript2.
Sorry to bring all this up, if not possible to change, I will implement workarounds to try to maintain previous behaviour.
Thanks!