Thread View: pilot.programmer
4 messages
4 total messages
Started by David Ladanyi
Wed, 04 Sep 2002 15:14
multiline label on button
Author: David Ladanyi
Date: Wed, 04 Sep 2002 15:14
Date: Wed, 04 Sep 2002 15:14
10 lines
1272 bytes
1272 bytes
Hi I can't figure out how to put a multiline label on a button. I've tried inserting \n, \r, \r\n, \n\r both at design time in Constructor and at run time using the CtlSetLabel function and nothing works. The \n and \r sequences translate to little ASCII squares, not new lines. How can I get this to work? I'm testing with the emulator only - could that be the problem? Dave
Re: multiline label on button
Author: Ben Combee
Date: Wed, 04 Sep 2002 15:20
Date: Wed, 04 Sep 2002 15:20
18 lines
1923 bytes
1923 bytes
In article <30890494.0209040714.52ea024d@posting.google.com>, david_ladanyi@yahoo.com says... > Hi > > I can't figure out how to put a multiline label on a button. I've > tried inserting \n, \r, \r\n, \n\r both at design time in Constructor > and at run time using the CtlSetLabel function and nothing works. The > \n and \r sequences translate to little ASCII squares, not new lines. > How can I get this to work? I'm testing with the emulator only - could > that be the problem? Buttons don't support multiline labels. If you've seen them, they've been buttons with no label, with a separate Label object overlapping them. -- Ben Combee <bcombee@metrowerks.com> CodeWarrior for Palm OS technical lead Get help at http://palmoswerks.com/
Re: multiline label on button
Author: David Ladanyi
Date: Thu, 05 Sep 2002 16:54
Date: Thu, 05 Sep 2002 16:54
31 lines
2643 bytes
2643 bytes
Ben Combee <combee@techwood.org> wrote in message news:<MPG.17dfe08cc99b8ae598986d@news.earthlink.net>... > In article <30890494.0209040714.52ea024d@posting.google.com>, > david_ladanyi@yahoo.com says... > > Hi > > > > I can't figure out how to put a multiline label on a button. I've > > tried inserting \n, \r, \r\n, \n\r both at design time in Constructor > > and at run time using the CtlSetLabel function and nothing works. The > > \n and \r sequences translate to little ASCII squares, not new lines. > > How can I get this to work? I'm testing with the emulator only - could > > that be the problem? > > Buttons don't support multiline labels. If you've seen them, they've > been buttons with no label, with a separate Label object overlapping > them. I've tried using the seperate Label strategy and it seems that the only way to get it to work was to set a long garbage string in the Label at design time, then replace it during run time with the appropriate string with a \r for the line break. The only problem is that there is a break in the Button border now where the original long text was placed. Constructor doesnt seem to recognise the \r character when I tried using it at design time however, when I leave the Label blank in Constructor i get a run time error saying the Label is now too long, so the space filler seems necessary. Ive tried using FrmHideObject and FrmShowObject and stil the gap remains until you click the button once. Is there any way to fix this? All of this seems like an extremely convoluted hack for something that should be a basic feature, as it is with the PocketPC. Dave
Re: multiline label on button
Author: Gavin Maxwell
Date: Fri, 06 Sep 2002 03:47
Date: Fri, 06 Sep 2002 03:47
27 lines
2331 bytes
2331 bytes
You could use WinDrawChars to do this as well - then you don't have to worry about Label controls - but you will have to worry about updating the text as required. Gavin. Ben Combee <combee@techwood.org> wrote in message news:MPG.17dfe08cc99b8ae598986d@news.earthlink.net... > In article <30890494.0209040714.52ea024d@posting.google.com>, > david_ladanyi@yahoo.com says... > > Hi > > > > I can't figure out how to put a multiline label on a button. I've > > tried inserting \n, \r, \r\n, \n\r both at design time in Constructor > > and at run time using the CtlSetLabel function and nothing works. The > > \n and \r sequences translate to little ASCII squares, not new lines. > > How can I get this to work? I'm testing with the emulator only - could > > that be the problem? > > Buttons don't support multiline labels. If you've seen them, they've > been buttons with no label, with a separate Label object overlapping > them. > -- > Ben Combee <bcombee@metrowerks.com> > CodeWarrior for Palm OS technical lead > Get help at http://palmoswerks.com/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads