|
-
Nov 4th, 2001, 08:34 PM
#1
Thread Starter
Hyperactive Member
FlexGrid Question
Is there a way to SPECIFY the width of EACH column in the flexgrid?
??
-
Nov 4th, 2001, 08:37 PM
#2
Lively Member
use dis wicked code, aii
VB Code:
MSFlexGrid1.ColWidth(0) = 1000
-
Nov 4th, 2001, 08:52 PM
#3
Thread Starter
Hyperactive Member
Kick Ass.
Is that in Pixels, Twips, or what?
-
Nov 4th, 2001, 08:54 PM
#4
Lively Member
usually twips, but I fink it depends on da scalemode of da form, aii
-
Nov 4th, 2001, 08:57 PM
#5
Thread Starter
Hyperactive Member
Alright, Kickass.
Thanks.
-
Nov 4th, 2001, 10:54 PM
#6
Thread Starter
Hyperactive Member
What about pictures.
Can you put an ICON or IMAGE in a column?
-
Nov 4th, 2001, 11:09 PM
#7
Hyperactive Member
progeix, your question did help me too. Thanks Ali etc...
-
Nov 4th, 2001, 11:31 PM
#8
Thread Starter
Hyperactive Member
Originally posted by CutePretty
progeix, your question did help me too. Thanks Ali etc...
Cool. That's always good.
Oh, ONE last question, That I have:
Is there a way to make it so you can *ONLY* select one row at a time. It allows you to select as many as you want, and I need it to select ONLY one row at a time.
-
Nov 5th, 2001, 12:11 AM
#9
PowerPoster
Well
Originally posted by progeix
What about pictures.
Can you put an ICON or IMAGE in a column?
Select column and row thn
Me.msflexgrid1.cellpicture=loadpicture() ' Put picture path or imagelist reference....
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Nov 5th, 2001, 09:07 AM
#10
Fanatic Member
As far as selecting by column...
grid.AllowBigSelection = False
grid.SelectionMode = flexSelectionByColumn
grid.FocusRect = flexFocusNone
play with these. Selection Mode is the key, but check the other
settings to get the grid to look like you need.
-Enjoy
-
Nov 5th, 2001, 04:05 PM
#11
Thread Starter
Hyperactive Member
Ohhh... I'm sorry, I wasn't very clear.
I mean like, If you click a row, all the columns IN that row will light up.
BUT, If you SELECT a row, and drag the cursor down, you can select MULTIPLE rows..
I need it so, you can only select one whole row at a time...
If you need a picture, i'll be happy to produce one.
-
Nov 5th, 2001, 04:10 PM
#12
PowerPoster
Well
You can fake it by setting the select hilight color to the backcolor of the grid.
To my knowleddge there is not a way to stop multiple selecting...
You can force SELECTIONBYROW, but user can still highlight more than 1 row.
I just store the row on the ENTERCELL event, and set my column picture on that row...
Does this make sense?
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Nov 5th, 2001, 04:12 PM
#13
Fanatic Member
grid.AllowBigSelection = False
grid.SelectionMode = flexSelectionByRow
Try that.
-
Nov 5th, 2001, 04:20 PM
#14
Fanatic Member
ah.
I left something out of that last one.
on the click event,
set grid.row = grid.rowsel
This will set the row to the last clicked row.
-
Nov 5th, 2001, 04:22 PM
#15
PowerPoster
Well
I just store the row on the ENTERCELL event
That's what I meant...
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Nov 5th, 2001, 04:29 PM
#16
Thread Starter
Hyperactive Member
Salright? Salright.
I did that, and
"Wrong number of arguments or invalid property assignment"
Anyone know?
-
Nov 5th, 2001, 04:34 PM
#17
Fanatic Member
I don't know if you were responding to me or Mr. Stanich.
Basically we do the same thing.
He stores the value to a variable of the last row entered, and
I set the row highlight to the last selected row...
either or.
But, if you were talking to me, don't use the set with the grid.row.
the code would read
grid.row = grid.rowsel
like that, no set. my bad.
good luck.
-
Nov 5th, 2001, 04:37 PM
#18
Thread Starter
Hyperactive Member
Originally posted by JPicasso
I don't know if you were responding to me or Mr. Stanich.
Basically we do the same thing.
He stores the value to a variable of the last row entered, and
I set the row highlight to the last selected row...
either or.
But, if you were talking to me, don't use the set with the grid.row.
the code would read
grid.row = grid.rowsel
like that, no set. my bad.
good luck.
It's still letting me select many rows =/
-
Nov 5th, 2001, 04:43 PM
#19
PowerPoster
Re: Well
Originally posted by James Stanich
You can fake it by setting the select hilight color to the backcolor of the grid.
To my knowleddge there is not a way to stop multiple selecting...
You can force SELECTIONBYROW, but user can still highlight more than 1 row.
I just store the row on the ENTERCELL event, and set my column picture on that row...
Does this make sense?
As I said, and I've asked before, there is no known way to stop this... Fake it yes, but not stop it....
Attached is how I do it...
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Nov 5th, 2001, 04:50 PM
#20
Thread Starter
Hyperactive Member
Sorta done something
on the MOUSEMOVE event,
"List.Row = List.RowSel"
That works, except it only "selects" the first COLUMN in that row. anyway to get it to select all of the columns in that row?
-
Nov 5th, 2001, 05:17 PM
#21
Thread Starter
Hyperactive Member
SALRIGHT!
Private Sub List_SelChange()
List.Row = List.RowSel
List.ColSel = 2
End Sub
Works flawlessly.
you can SELECT all of the rows, but once you let go.. it only selects one
SHIFT+ARROW KEYS doesn't work either.
perhaps there is more code to drag only one selection over the rows.. i'll work on it
Cheers
-
Nov 5th, 2001, 08:21 PM
#22
PowerPoster
Well
yeh I played with this too. I selected the row and set my picture after the user stops playing...
You think MS would have offred this option...
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Nov 6th, 2001, 08:24 AM
#23
Fanatic Member
James, thats one nice looking grid! Hey now!
---
progeix,
I guess I forgot something in the get-one-row-to-highlight code.
on the grid setup, I set:
grid.SelectionMode = flexSelectionByRow
grid.AllowBigSelection = False
grid.FocusRect = flexFocusNone
then in the click event...
grid.row = grid.rowsel
grid.col = 0
grid.colsel = grid.cols -1
I forgot about the columns. It's been a while since I wrote that.
The flex grid is a great tool, if you don't mind some manual coding.
I'm guessing some of the comercial controsl out there are better.
There outta be an easier way...
-
Nov 6th, 2001, 08:58 AM
#24
PowerPoster
Well
The flex grid is a great tool, if you don't mind some manual coding.
It's universal, but it leaves the Whistles and Bells alone. I use it extensively, and most of the time, have found it to suit most of the need.
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|