Vertical Text?

If anyone has any suggestions on how to accomplish the following, please

let me know. I could probably do it with a bunch of hard-coded bitmaps,

but would prefer not to. I'm new to Forte and running 2.0 on Sun Solaris

2.5. I'm trying to mimic an existing GUI writting in Motif.

Essentially I have a data application that displays data horizontally

with the field displayed vertically, such as:

c c c c c

o o o o o

l l l l l<-- note this text is actually vertically

1 2 3 4 5oriented and in a fixed position

+--+(and set as a result of the db query).

| Data1 X X X X X |

| Data2 X X X X X |<-- this is a scrolling viewport

| Data2 X X X X X |

| ..... X X X X X |

+--+

In Motif you can change the orientation of the text to 90 degrees

(or you could also "fake" it by entering a Label value of, for

example, "c\no\nl\n1" to get horizontal text stacked vertically.

Besides bitmaps, any ideas on how to do it in Forte?

Thanks,

Marc Ries

ries@venice.sedd.trw.com

[1125 byte] By [] at [2007-11-25 4:59:29]
# 1

>

>

>If anyone has any suggestions on how to accomplish the following, please

>let me know. I could probably do it with a bunch of hard-coded bitmaps,

>but would prefer not to. I'm new to Forte and running 2.0 on Sun Solaris

>2.5. I'm trying to mimic an existing GUI writting in Motif.

>

>Essentially I have a data application that displays data horizontally

>with the field displayed vertically, such as:

>

>c c c c c

>o o o o o

>l l l l l<-- note this text is actually vertically

>1 2 3 4 5oriented and in a fixed position

> +--+(and set as a result of the db query).

> | Data1 X X X X X |

> | Data2 X X X X X |<-- this is a scrolling viewport

> | Data2 X X X X X |

> | ..... X X X X X |

> +--+

>

> In Motif you can change the orientation of the text to 90 degrees

> (or you could also "fake" it by entering a Label value of, for

> example, "c\no\nl\n1" to get horizontal text stacked vertically.

>

> Besides bitmaps, any ideas on how to do it in Forte?

>

> Thanks,

>

> Marc Ries

> ries@venice.sedd.trw.com

>

>

>

You can "fake" it in Forte the same way you would do it in Motif. Just put

a newline '\n' between the characters.

Eddy Luyten

Cap Volmac Belgium

ELuyten@inetgate.capvolmac.nl

at 2007-6-29 9:16:29 > top of Java-index,Application & Integration Servers,Integration Servers...
# 2

Hi Marc,

I may not have understood your requirements exactly, but...

In the Window Workshop, I created a TextField. On the

TextField Properties dialogue, I clicked on "Size Policy..."

and there I set Visible Columns and Minimum Columns to 1.

I set Visible Lines to 5 (for example). When I set the

font to be a monospace font, I got this

H

e

l

l

o

when the TextField was set to 'Hello'.

Hope this helps!

Geoff

at 2007-6-29 9:16:29 > top of Java-index,Application & Integration Servers,Integration Servers...
# 3

>> In Motif you can change the orientation of the text to 90 degrees

>> (or you could also "fake" it by entering a Label value of, for

>> example, "c\no\nl\n1" to get horizontal text stacked vertically.

>> Besides bitmaps, any ideas on how to do it in Forte?

Marc, try the following class export (exported from Forte 2.0.D.0)

It demonstrates the creation of vertical text at run-time in case

design-time is not possible.

It could be simplified if I knew how to put a carriage-return into

text using code, but I didn't have time to figure that one out.

Hope this is helpful.

class TestVertical is mapped inherits from DisplayProject.UserWindow

has public method Init;

has public method Display;

has public method TextVertical(input P_Text: Framework.TextData):

DisplayProject.GridField;

has property

shared=(allow=on, override=on, default=off);

transactional=(allow=on, override=on, default=off);

monitored=(allow=on, override=on, default=off);

distributed=(allow=off, override=off);

has

+51514631000001bb000001729fe4010100002101020000000002020600940800

+1d009fff010104210f1011120101011700009fff000000000800000bb80fa000

+000000000000000000010160600000000000000000009d0bb89d0fa000010503

+0301fffd0000000000000c0405000600000201000100000c000001000b030000

+21010200000000050400001c01000506007a08004d009fff010101010f101112

+0101011700009fff010000000800005dc05dbf000000000303030300020404a0

+a00000000000000000009d5dc09d5dbf000105066b010000005dc05dbf000600

+06000021010200000000070706007c08000d000b0b446973706c61795f475244

+010104010f1011120101011700019fff0c000000089d01ab9d016201f401f400

+000000030303030005010160600000000000000000009d01f49d01f400010508

+100100000001f401f400040000009fff009fff00010100000904040208000021

+000200000000090600030201000000000000091a7d888e9ce09ceb9d015c9d01

+669d01721b191a385d5e6a7d87888c8e9cac9cd19cd29cde9ce09cea9ceb9d01

+149d013d9d013e9d014a9d015b9d015c9d01669d01669d01720301

-005608bf

end class;

method TestVertical.Init

begin

super.Init();

end method;

method TestVertical.Display

begin

Text:array of textdata=new;

field:array of gridfield=new;

for i in 1 to 5 do

text=new;

text.setvalue('vert');

text.concat(i);

field=TextVertical(text);

field.row=1;

field.column=i;

field.parent=<Display_GRD>;

end for;

self.Open();

event loop

when task.Shutdown do

exit;

end event;

self.Close();

end method;

method TestVertical.TextVertical(input P_Text: Framework.TextData):

DisplayProject.GridField

begin

g:gridfield=new;

g.horzdividerweight=w_none;

g.frameweight=w_none;

row:integer=1;

col:integer=1;

for i in 0 to P_Text.actualsize-1 do

t:TextGraphic=new;

t.text=P_Text.copyrange(i,i+1);

t.row=row;

t.column=col;

t.parent=g;

row=row+1;

end for;

return g;

end method;

at 2007-6-29 9:16:29 > top of Java-index,Application & Integration Servers,Integration Servers...
# 4

>If anyone has any suggestions on how to accomplish the following, please

>let me know. I could probably do it with a bunch of hard-coded bitmaps,

>but would prefer not to. I'm new to Forte and running 2.0 on Sun Solaris

>2.5. I'm trying to mimic an existing GUI writting in Motif.

>Essentially I have a data application that displays data horizontally

>with the field displayed vertically, such as:

>c c c c c

>o o o o o

>l l l l l<-- note this text is actually vertically

>1 2 3 4 5oriented and in a fixed position

> +--+(and set as a result of the db query).

> | Data1 X X X X X |

> | Data2 X X X X X |<-- this is a scrolling viewport

> | Data2 X X X X X |

> | ..... X X X X X |

> +--+

> In Motif you can change the orientation of the text to 90 degrees

> (or you could also "fake" it by entering a Label value of, for

> example, "c\no\nl\n1" to get horizontal text stacked vertically.

> Besides bitmaps, any ideas on how to do it in Forte?

> Thanks,

> Marc Ries

> ries@venice.sedd.trw.com

Mark,

You can do this easily with a Text Graphic. Just place a text graphic object

on your window and open its "Properties" window. Then enter each letter of

your vertical label with a return (from the keyboard, not the "\n") after each

letter. It will give you a text graphic with the text in a vertical format.

I am running under version v1k9 of Forte and just tried it and it works. I

would assume it would still work under version 2.0.

Hope this helps.

Kevin Shaughnessy

Computing Analysis Corporation <a href=

"http://www.cac.com">http://www.cac.com</a>

Arlington, VA USA

kshaughnessy@snap.org

at 2007-6-29 9:16:29 > top of Java-index,Application & Integration Servers,Integration Servers...