Applications, Games, Tools, User libs and useful stuff coded in PureBasic
Everything
Enthusiast
Posts: 225 Joined: Sat Jul 07, 2018 6:50 pm
Post
by Everything » Wed Oct 02, 2019 3:41 pm
Now it works like a charm
Thx.
davido
Addict
Posts: 1890 Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK
Post
by davido » Mon Oct 14, 2019 7:03 pm
@Thorsten1867 ,
Do you know if it is possible to setup Drag/Drop on:
Rows or Columns or even Cells (single or multiple)?
DE AA EB
Thorsten1867
Addict
Posts: 1372 Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany
Post
by Thorsten1867 » Tue Oct 15, 2019 3:22 pm
I don't have much experience with Drag & Drop yet, but it should be possible. With EventDropX() and EventDropY() it should be possible to determine the row or column.
davido
Addict
Posts: 1890 Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK
Post
by davido » Tue Oct 15, 2019 7:49 pm
@
Thorsten1867 ,
Thank you, very much, for your rapid and very helpful response.
I have checked your suggestion and it appears to work.
I apologise for not having taken enough care to find this in the manual.
DE AA EB
Thorsten1867
Addict
Posts: 1372 Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany
Post
by Thorsten1867 » Wed Oct 16, 2019 3:56 pm
Update: Drag & Drop for editable cells (text)
davido
Addict
Posts: 1890 Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK
Post
by davido » Wed Oct 16, 2019 7:10 pm
@
Thorsten1867 ,
An unexpected gift! Thank you.
Works fine for me.
You've made it
so easy to set-up. Brilliant!
DE AA EB
Thorsten1867
Addict
Posts: 1372 Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany
Post
by Thorsten1867 » Thu Oct 17, 2019 7:08 am
Update:
Bugfix: Font
Drag & Drop: Insert a space if the cell already contains text.
@davido
Sounded like a good idea, which could be integrated without much effort.
Cyllceaux
Enthusiast
Posts: 510 Joined: Mon Jun 23, 2014 1:18 pm
Post
by Cyllceaux » Fri Oct 18, 2019 8:06 am
some HARD-Performance-Tweaks for FitColumn
In AddItem
Code: Select all
If ListEx()\FitCols : FitColumns_() : EndIf
To
Code: Select all
If ListEx()\ReDraw
If ListEx()\FitCols : FitColumns_() : EndIf
UpdateRowY_()
Draw_()
EndIf
In DisableReDraw
Code: Select all
Else
ListEx()\ReDraw = #True
If ListEx()\FitCols : FitColumns_() : EndIf
UpdateRowY_()
UpdateColumnX_()
Draw_()
EndIf
SetItemText (on both positions)
Code: Select all
If ListEx()\ReDraw
If ListEx()\Cols()\Flags & #FitColumn : FitColumns_() : EndIf
Draw_()
EndIf
Last edited by
Cyllceaux on Sun Oct 20, 2019 8:25 pm, edited 1 time in total.
Cyllceaux
Enthusiast
Posts: 510 Joined: Mon Jun 23, 2014 1:18 pm
Post
by Cyllceaux » Fri Oct 18, 2019 8:13 am
Another Question...
How to set #FitColumn for Column 0?
Cyllceaux
Enthusiast
Posts: 510 Joined: Mon Jun 23, 2014 1:18 pm
Post
by Cyllceaux » Fri Oct 18, 2019 9:21 am
fond this
#Enable_ProgressBar = #False
Code: Select all
CompilerIf #Enable_ProgressBar
Declare SetProgressBarAttribute(GNum.i, Attrib.i, Value.i)
Declare SetProgressBarFlags(GNum.i, Flags.i)
CompilerEndIf
Cyllceaux
Enthusiast
Posts: 510 Joined: Mon Jun 23, 2014 1:18 pm
Post
by Cyllceaux » Fri Oct 18, 2019 9:36 am
_SynchronizeScrollCols()
Code: Select all
If ScrollPos < ListEx()\Col\OffsetX
ListEx()\Col\OffsetX = ScrollPos; - dpiX(20)
ElseIf ScrollPos > ListEx()\Col\OffsetX
ListEx()\Col\OffsetX = ScrollPos; + dpiX(20)
EndIf
After I changed this... it's not flickering anymore
Cyllceaux
Enthusiast
Posts: 510 Joined: Mon Jun 23, 2014 1:18 pm
Post
by Cyllceaux » Sun Oct 20, 2019 8:21 pm
Oh... I have an EditGadget and a ListEx in the same window.
The ListEx takes the Returnkey so there is no Linebreak in the EditorGadget.
Cyllceaux
Enthusiast
Posts: 510 Joined: Mon Jun 23, 2014 1:18 pm
Post
by Cyllceaux » Tue Oct 22, 2019 5:02 pm
Thorsten1867 wrote: See if it works now.
The EditorGadget workes fine
thx
kinglestat
Enthusiast
Posts: 746 Joined: Fri Jul 14, 2006 8:53 pm
Location: Malta
Contact:
Post
by kinglestat » Sat Oct 26, 2019 11:16 am
First of all, I quite like your grid. I am a heavy grid user!
I have 4 questions
Q1 is it possible to have rows of different sizes?
Q2 Is it possible to have only certain cells editable? For example only 1 cell in a whole grid
Q3 Is it possible to have a individual/different types in same column? For example column 2 row 1 string, column 2 row 2 combobox etc
Q4 If there is an image + edit/string in cell, is it possible to detect image click?