> Hi. How can I set label or tooltip containing newline('\n') via fluid?
> If I set label or tooltip to "some\nstring" in fluid, it will
> generate such code:
>
> > o->tooltip("some\\nstring");
>
> Is this supposed behavior? Or should I fill a bug?
This is intended behaviour. I think it is even documented, although I
can't find where.
Remember that "\n" is a C language convention for denoting a line break,
and fluid is trying to help you out be escaping your "\" backslash
symbol.
If you want to insert an actual line break into your text string, I
think you need to do that by inserting an ASCII line break (Ctrl-J, or
decimal 10) into the string directly.
Fluid usually lets you just type Ctrl-J at that point and it inserts the
correct escapes for you.
See attached fluid file, where I just typed Ctrl-J to insert the line
breaks.
I hope it survives its journey through the mailing lists intact!
--
Ian
# data file for the Fltk User Interface Designer (fluid)
version 1.0110
header_name {.h}
code_name {.cxx}
Function {} {open
} {
Fl_Window {} {open
xywh {482 262 343 258} type Double visible
} {
Fl_Button {} {
label {label
string} selected
tooltip {multi
line
tooltip} xywh {25 25 95 60}
}
}
}
-----------
SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk