Article View: comp.windows.interviews
Article #227Radio&Toggle buttons
From: Richard Emberson
Date: Tue, 11 Aug 1992 19:56
Date: Tue, 11 Aug 1992 19:56
76 lines
2436 bytes
2436 bytes
In article <9208051004.AA26029@nestler.uucp>, nestler!amr@LURCH.STANFORD.EDU (Andre Mueller) writes:
|> I am just looking how the (3.1-beta) WidgetKit can be used for our
|> application (CAD).
|> What I need is a radio button with a bitmap inside. If I use
|> WidgetKits's radio_button then I get a radio button with a diamond
|> on its left side - but that is not the look that I expected.
|> Is there anybody out there who needs (bitmap) radio buttons with such
|> a look or is that a bug?
|>
|> Even if it is no bug - would it be possible for the interviews developers
|> to introduce another radio_button function to the WidgetKit that generates
|> a button with a push_button_look. I can imagine that not only CAD
|> applications need radio_buttons with bitmaps/images but WITHOUT diamonds!
here's some code that works for me....
RadioButton
.........
// make button
char* tmpString;
if (getAttribute("standard",tmpString) && !isTrue(tmpString))
{
//
// not standard: radio button with glyph inside
//
_button = kit->push_button(_glyph , _action);
TelltaleState* t = _button->state();
t->set(TelltaleState::is_choosable,true);
t->join(getRadioGroup());
}
else
{
//
// standard: regular radio button
//
_button = kit->radio_button(getRadioGroup(), _glyph , _action);
}
.........
Toggle Button
.........
// make button
char* tmpString;
if (getAttribute("standard",tmpString) && !isTrue(tmpString))
{
//
// not standard: toggle with glyph inside
//
_button = kit->push_button(_glyph , _action);
TelltaleState* t = _button->state();
t->set(TelltaleState::is_toggle,true);
}
else
{
//
// standard: regular toggle
//
_button = kit->check_box(_glyph , _action);
}
.......
Richard Emberson
rme@msi.com
--
Molecular Simulations, Inc. mail: rme@msi.com
796 N. Pastoria Avenue uucp: uunet!msi!rme
Sunnyvale, California 94086 phone: 408/522-9233
Technical Details
Message-ID:
<1992Aug11.195630.25535@msi.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!mips!msi!rmeShow Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!mips!msi!rme From: rme@msi.com (Richard Emberson) Subject: Radio&Toggle buttons Message-ID: <1992Aug11.195630.25535@msi.com> Sender: usenet@msi.com (USENET) Organization: Molecular Simulations, Inc. Date: Tue, 11 Aug 1992 19:56:30 GMT Lines: 76