Discussion:
using text and icon in VB button
(too old to reply)
Piyush
2005-10-06 12:49:10 UTC
Permalink
HI

I need to use both 1) icon \ picture and 2) text(caption) within a command
button in a VB6 applicaion.

I can do this in one way by using a picture box in a command button but in
this way user cannot utilise the command button by clicking the picture box
part, user will have to click the caption part.

In second method I can use picture propery of command button, but in this
way I cannot use both caption and picture\icon.
Please help me if there is any feasible method available to this problem

Regards
piyush
Jan Hyde
2005-10-06 13:46:33 UTC
Permalink
Piyush <***@discussions.microsoft.com>'s wild thoughts
were released on Thu, 6 Oct 2005 05:49:10 -0700 bearing the
Post by Piyush
HI
I need to use both 1) icon \ picture and 2) text(caption) within a command
button in a VB6 applicaion.
I can do this in one way by using a picture box in a command button but in
this way user cannot utilise the command button by clicking the picture box
part, user will have to click the caption part.
In second method I can use picture propery of command button, but in this
way I cannot use both caption and picture\icon.
Why? It works just fine for me.

J
Post by Piyush
Please help me if there is any feasible method available to this problem
Regards
piyush
Jan Hyde (VB MVP)
--
If you have a lot of tension and you get a headache,
do what it says on the aspirin bottle:
Take two and keep away from children. (Barbie Jo)

[Abolish the TV Licence - http://www.tvlicensing.biz/]
Rick Rothstein [MVP - Visual Basic]
2005-10-06 15:52:47 UTC
Permalink
Post by Piyush
In second method I can use picture propery of command button,
but in this way I cannot use both caption and picture\icon.
As Jan said, this method works fine. Are you remembering to set
the Style property to 1-Graphical (at design time) and the Picture
property to your picture/icon file?

Rick
Piyush
2005-10-18 11:19:03 UTC
Permalink
HI Jan

Thanks for your reply. Yeah I do remember to set the picture and style
property as you mentioned. But with this settings we cannot align both icon
and caption(text) in single line (this align Icon in center and caption comes
in next line, which looks really awful). We can take examples from MS
powerpoint buttons, where icon is in left and caption in right

Regards
Peeyush
Post by Rick Rothstein [MVP - Visual Basic]
Post by Piyush
In second method I can use picture propery of command button,
but in this way I cannot use both caption and picture\icon.
As Jan said, this method works fine. Are you remembering to set
the Style property to 1-Graphical (at design time) and the Picture
property to your picture/icon file?
Rick
Michael Cole
2005-10-19 00:58:20 UTC
Permalink
[Adjusted for Top-Posting]
Post by Piyush
Post by Rick Rothstein [MVP - Visual Basic]
Post by Piyush
In second method I can use picture propery of command button,
but in this way I cannot use both caption and picture\icon.
As Jan said, this method works fine. Are you remembering to set
the Style property to 1-Graphical (at design time) and the Picture
property to your picture/icon file?
HI Jan
Thanks for your reply. Yeah I do remember to set the picture and style
property as you mentioned. But with this settings we cannot align
both icon and caption(text) in single line (this align Icon in center
and caption comes in next line, which looks really awful).
That's correct. VB doesn't (natively) allow the inline display.
As for looking awful, that would depend on the use of the button - each to
their own.
Post by Piyush
We can
take examples from MS powerpoint buttons, where icon is in left and
caption in right
Powerpoint isn't written in VB.


--
Regards,

Michael Cole

Loading...