[Implemented] GetGadgetColumWidth, SetGadgetColumnWidth
[Implemented] GetGadgetColumWidth, SetGadgetColumnWidth
*This request could be addressed by a simple set of general Get/Set functions instead *
Hi Fred,
If the user resizes columns in a ListIconGadget, I would like to be able to get those new column widths later so as I can save them and restore the column widths the next time the user starts up my application.
Please add:
- SetGadgetColumnWidth - Set the column width of a ListIconGadget column dynamically at runtime.
e.g. SetGadgetColumnWidth(#MyGadget, position, width)
- GetGadgetColumnWidth - Get what the current column width is of a ListIconGadget column so as I can save it for later use.
e.g. Width = GetGadgetColumnWidth(#MyGadget,position)
Thanks Fred!
Hi Fred,
If the user resizes columns in a ListIconGadget, I would like to be able to get those new column widths later so as I can save them and restore the column widths the next time the user starts up my application.
Please add:
- SetGadgetColumnWidth - Set the column width of a ListIconGadget column dynamically at runtime.
e.g. SetGadgetColumnWidth(#MyGadget, position, width)
- GetGadgetColumnWidth - Get what the current column width is of a ListIconGadget column so as I can save it for later use.
e.g. Width = GetGadgetColumnWidth(#MyGadget,position)
Thanks Fred!
Last edited by USCode on Wed Apr 14, 2004 9:09 pm, edited 1 time in total.
that would be nice!
just because there is a general problem with the columnsizes
i think this is the same in other languages, but its not nice. so a option to resize the columnwidth is nery needed.
just because there is a general problem with the columnsizes
Code: Select all
#width=330
a=#width/3
b=#width/3
c=#width/3
If OpenWindow(0, 280, 190, 350, 340, #PB_Window_SystemMenu | #PB_Window_TitleBar |#PB_Window_MinimizeGadget, "")
neu:
If CreateGadgetList(WindowID())
ListIconGadget(0, 10, 30, #width, 290,"1",a)
AddGadgetColumn(0,1,"2",b)
AddGadgetColumn(0,2,"3",c)
EndIf
EndIf
Repeat
If x=0
MessageRequester("","each column is #width / 3"+Chr(13)+"but it doesn't fit"+Chr(13)+"look at the scrollbar below")
x+1
Delay(100)
ElseIf x=1
a-4
x+1
Delay(100)
Goto neu:
ElseIf x=2
MessageRequester("","width 4 pixel less it fits"+Chr(13)+"(4 columnborders)")
x+1
Delay(100)
ElseIf x=3
For i=0 To 50
AddGadgetItem(0,i,"one"+Chr(10)+"two"+Chr(10)+"three")
Next
x+1
Delay(100)
ElseIf x=4
MessageRequester("","but even with this short strings"+Chr(13)+" the srollbar is back!"+Chr(13)+"because of the scrollbar at the right side"+Chr(13)+"but when i reserve the place for the right scrollbar from beginning")
x+1
c-25
Delay(100)
Goto neu:
ElseIf x=5
MessageRequester("","i get 4 columns...")
x+1
Delay(100)
Else
MessageRequester("","end")
End
EndIf
Until WaitWindowEvent()=#PB_Event_CloseWindow
Re: Feature Request: GetGadgetColumWidth, SetGadgetColumnWid
> Please add:
> SetGadgetColumnWidth - Set the column width of a ListIconGadget
> GetGadgetColumnWidth - Get what the current column width
Yes, would be nice to have this natively. Currently it's done via API calls:
> SetGadgetColumnWidth - Set the column width of a ListIconGadget
> GetGadgetColumnWidth - Get what the current column width
Yes, would be nice to have this natively. Currently it's done via API calls:
Code: Select all
SendMessage_(GadgetID(#listicongadget),#LVM_SETCOLUMNWIDTH,column,width)
SendMessage_(GadgetID(#listicongadget),#LVM_GETCOLUMNWIDTH,column,0)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
4.0, setting column widths?
Does anyone know if this issue has been addressed by any of the enhancements in 4.0? I don't believe it has based on what I can get from the readme?
I just squeezed these into the next v4 beta:
Code: Select all
GetGadgetItemAttribute(#Gadget, 0, #PB_ListIcon_ColumnWidth, 2) ; return width of column 2
SetGadgetItemAttribute(#Gadget, 0, #PB_ListIcon_ColumnWidth, 100, 2) ; set width of column 2 to 100
GetGadgetItemText(#Gadget, -1, 2) ; return header text for column 2
SetGadgetItemText(#Gadget, -1, "New Text", 2) ; change header text for column 2
quidquid Latine dictum sit altum videtur
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
You realise that we are going to owe Freak a lifetime's supply of pizza for all the work he has done?? And I don't even know if Fred is still alive after these marathon adding sessions. Pretty sure it's a bot in IRC these days due to Fred's body giving up the ghost.
Phew, what a language. I can sit here, bugs or not and crank out handly little things to use after a few minutes and I am as dumb as a rock. Can't do that with other languages.
You guys blokes are dead set legends!
Phew, what a language. I can sit here, bugs or not and crank out handly little things to use after a few minutes and I am as dumb as a rock. Can't do that with other languages.
You guys blokes are dead set legends!
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet