Canvas based Grid gadget
Re: Canvas based Grid gadget
Very nice gadget and useful.
Adding few hundred records to grid with sql select loop is may seem no problem but 6K records take 20 seconds with elapsedmilliseconds and disabled debugger on intel i5 8GB RAM. 27MB RAM and 50% CPU is used.
Would be very thankful for solution.
Adding few hundred records to grid with sql select loop is may seem no problem but 6K records take 20 seconds with elapsedmilliseconds and disabled debugger on intel i5 8GB RAM. 27MB RAM and 50% CPU is used.
Would be very thankful for solution.
Re: Canvas based Grid gadget
Rich gadgets are not intended to populate entire data set. Change your code to fill only 50 or whatever records and use scrollbars to update.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: Canvas based Grid gadget
Thank You very much.
I got that part but scrolling is not working.
I have digged deeper and found that "shift", "ctrl" and "ctrl"+"shift" handled but not #PB_Canvas_Shift and Srolling
Strange part that MyGrid example is working.
I got that part but scrolling is not working.
I have digged deeper and found that "shift", "ctrl" and "ctrl"+"shift" handled but not #PB_Canvas_Shift and Srolling
Strange part that MyGrid example is working.
Last edited by LiK137 on Thu Apr 04, 2019 9:42 pm, edited 1 time in total.
Re: Canvas based Grid gadget
Hi,LiK137 wrote:Very nice gadget and useful.
Adding few hundred records to grid with sql select loop is may seem no problem but 6K records take 20 seconds with elapsedmilliseconds and disabled debugger on intel i5 8GB RAM. 27MB RAM and 50% CPU is used.
Would be very thankful for solution.
To load big number of rows, i would use it this way (not sure if you are not using it already though):
Code: Select all
MyGrid::NoRedraw(Gadget)
.... load huge data here ...
MyGrid::Redraw(Gadget)
Said
Re: Canvas based Grid gadget
Thank You very much.
I agree with that big data should be handled by partial load with scrolling.
And I see that scrolling is handled and index is changing based on direction of scrolling.
Arrow keys with any combination (Ctrl and/or Shift) events are handled
MoveLeft...MoveDown is Handled but grid is not changing/refreshing.
Finaly, Redraw(Gadget) was just resizing while NoRedraw(Gadget) was changing flag permanently.
That is why grid was not refresing. Just Copied NoRedraw as AutoRedraw with flag set #True.
ThanQ very much again for replies.
I agree with that big data should be handled by partial load with scrolling.
And I see that scrolling is handled and index is changing based on direction of scrolling.
Arrow keys with any combination (Ctrl and/or Shift) events are handled
MoveLeft...MoveDown is Handled but grid is not changing/refreshing.
Finaly, Redraw(Gadget) was just resizing while NoRedraw(Gadget) was changing flag permanently.
That is why grid was not refresing. Just Copied NoRedraw as AutoRedraw with flag set #True.
ThanQ very much again for replies.
Re: Canvas based Grid gadget
@said
Thank you very much for your Grid gadget, I have used it successfully in one project already in combination with Google SQL Cloud.
I was wondering if it was possible to have something like
EditCell(Gadget.i, Row, Col, SetCellFocus = #True)
where after calling the cell is ready for immediate editing, without having to click the mouse to start the editing process.
P.S. Seasons Greetings !
Thank you very much for your Grid gadget, I have used it successfully in one project already in combination with Google SQL Cloud.
I was wondering if it was possible to have something like
EditCell(Gadget.i, Row, Col, SetCellFocus = #True)
where after calling the cell is ready for immediate editing, without having to click the mouse to start the editing process.
P.S. Seasons Greetings !
Singo
Win10, Win7, Debian x86 & OSX ~ PB 5.70 LTS
Minimbah NSW Australia
Win10, Win7, Debian x86 & OSX ~ PB 5.70 LTS
Minimbah NSW Australia
Re: Canvas based Grid gadget
Is like Excel, only not the F2 key but the Enter key.
Had once added the F2 key for editing
Had once added the F2 key for editing
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Canvas based Grid gadget
Thank you and yes AFTER clicking an editable cell you can then use the Return key.
But I want my program to do this NOT the user.
I would like my program to start and immediately be in an editable cell without any user clicking the mouse or pressing any keys.
Is this possible ?
Thank you
But I want my program to do this NOT the user.
I would like my program to start and immediately be in an editable cell without any user clicking the mouse or pressing any keys.
Is this possible ?
Thank you
Singo
Win10, Win7, Debian x86 & OSX ~ PB 5.70 LTS
Minimbah NSW Australia
Win10, Win7, Debian x86 & OSX ~ PB 5.70 LTS
Minimbah NSW Australia
Re: Canvas based Grid gadget
Hi Singo,singo wrote:
I would like my program to start and immediately be in an editable cell without any user clicking the mouse or pressing any keys.
First, glad to hear that my work was helpful to you, you are welcome ... and Seasons Greetings to everyone
I see the great mk-soft is trying to help as always!
The default editing mode is: when in a cell, you start typing and you exit with any keys ... you overwrite existing content
The other mode is you hit enter in a cell and then the caret is placed at the end of current cell-text, so any new typed text is placed at the end ... you are appending new text to existing one
Back to your question, i believe this is the default mode, am i missing something here?
Said
Re: Canvas based Grid gadget
I think he wants to initialize the edit mode from a cell via the program, but this is not a standard.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Canvas based Grid gadget
Yes, exactly, I'm sorry if I wasn't clear but that is what I want to do.mk-soft wrote:I think he wants to initialize the edit mode from a cell via the program, but this is not a standard.
I want to use the grid for data entry and I don't want the user to have to click every time they want to make an entry.
Singo
Win10, Win7, Debian x86 & OSX ~ PB 5.70 LTS
Minimbah NSW Australia
Win10, Win7, Debian x86 & OSX ~ PB 5.70 LTS
Minimbah NSW Australia
Re: Canvas based Grid gadget
Version: v2.4
Update: 16.02.2022
- Added SetStyleItemList
- Added Keyboard Escape, Tab, Return to Combo
- Optimize open combo (position up or down)
Link: https://github.com/mk-soft-65/MyGrid/tr ... e-function
Update: 16.02.2022
- Added SetStyleItemList
- Added Keyboard Escape, Tab, Return to Combo
- Optimize open combo (position up or down)
Link: https://github.com/mk-soft-65/MyGrid/tr ... e-function
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
- captain_skank
- Enthusiast
- Posts: 636
- Joined: Fri Oct 06, 2006 3:57 pm
- Location: England
Re: Canvas based Grid gadget
A very nice grid control.
I'm probably misunderstanding this, but can individual row heights be set ? I've tried both :
SetRowHeight(Gadget.i, GRow.i, Height.i = #Default_RowHeight) and
AutoHeightRow(Gadget.i, GRow)
But it's unclear if this row specific or global.
I need to have variable row heights when getting text and blobs(text again) from a database so i currently use the web gadget and HTML tables but it's not as fast in data population and i have to limit it to about 200 rows.
Cheers
I'm probably misunderstanding this, but can individual row heights be set ? I've tried both :
SetRowHeight(Gadget.i, GRow.i, Height.i = #Default_RowHeight) and
AutoHeightRow(Gadget.i, GRow)
But it's unclear if this row specific or global.
I need to have variable row heights when getting text and blobs(text again) from a database so i currently use the web gadget and HTML tables but it's not as fast in data population and i have to limit it to about 200 rows.
Cheers
Re: Canvas based Grid gadget
The height is only calculated on one line.
Let's see how I can adjust this. Maybe I will use my DrawTextBox function and also support fixed line breaks.
At time only on line ...
Let's see how I can adjust this. Maybe I will use my DrawTextBox function and also support fixed line breaks.
At time only on line ...
Code: Select all
Define row
For row = 1 To MyGrid::GetRowCount(#Grid_Nbr)
MyGrid::AutoHeightRow(#Grid_Nbr, row)
Next
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Canvas based Grid gadget
Thanks in advance for this really useful Grid.
There is the possibility to decide how many rows can appear when I use a col type COMBO ?
I can change color, font. height ec.. but I can't find a way to make appear more than 5 lines of choice.
ok i can scroll but for a long list of choices (eg 20) it is faster to click on the chosen item.
Cheers
There is the possibility to decide how many rows can appear when I use a col type COMBO ?
I can change color, font. height ec.. but I can't find a way to make appear more than 5 lines of choice.
ok i can scroll but for a long list of choices (eg 20) it is faster to click on the chosen item.
Cheers