----- Original Message -----
From: Greg Moore <gamoore at aol dot com>
To: gettingstarted at lists dot realsoftware dot com
Sent: Mon, 27 Oct 2003 13:59:27 -0800
Subject: listbox & pop menu
> 1. When I have text display in a listbox, it is always justified to
> the top left, but I want it justified to middle (horizontal and
> vertical).
> a. I know there is a setting for default/left/center/right - but if
> i use center or right, i don't see any text in the box at all.
> b. I don't see any way to justify the text vertically to the middle
> of the box
For a listbox try Me.ColumnAlignment({column number goes here}) = 2 (Center) in
the Open event of the Listbox.
i.e. Me.ColumnAlignment(0) = 2 // Centers the first column in the listbox
0 = Default alignment
1 = Left
2 = Center
3 = Right
4 = Decimal
You may also use ColumnAlignmentOffset
I don't think you can center it vertically in the listbox, only horizontally.
You can manually center it in the listbox by setting the appropriate font and
font size and row height to give the desired effect.
>
> 2. I see how you can get the current value from a pop-up menu (either
> the selection index or the actual text of the list item). But how to
> you go in the other direction? If you load a record into a listbox,
> and select that listbox, and you want the fields to be put into
> listboxes - that works fine. But the same thing for setting the
> popupmenu does not seem to work. Is there a way.
>
> e.g. the popup has items (0,1,2,3,4,5) and the current value in a
> listbox is 3, how do i set the currently displayed selection to be 3?
> I don't want to change the caption of the popup menu so that it says
> "3" from that point on - just select 3 just as if you had pulled down
> the menu to 3 and left it there.
PopupMenu1.ListIndex = 3
>
> thanks in advance
>
HTH,
jammer
--
This email was brought to you by Kaxy Mail
http://www.kaxy.com/free_email_account.htm
- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|