It is currently Thu Jan 21, 2021 3:45 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 438 posts ]  Go to page Previous  1 ... 22, 23, 24, 25, 26, 27, 28 ... 30  Next
Author Message
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Tue Feb 25, 2020 10:06 pm 
Offline
User
User

Joined: Mon Jun 06, 2011 8:28 am
Posts: 29
Thorsten1867 wrote:
Update: Use DateEx, if available.

@ruslanx
Tested it. Scrolling works for me.



hmmm ... downloaded now and now working .. wtf.

https://prnt.sc/r7mf1q


try to move window when combo is opened .. or focusing on others

Thorsten1867, can I somehow change scrollbar color .. or not?


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Wed Feb 26, 2020 10:48 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
Update:
  • Added: Color for ComboBox items with AddComboBoxItem()
  • Bugfix: Move window
@ruslanx
The ScrollbarGadget of PB does not allow changing the color.
But as a consolation you can now change the color of the items of ComboBoxes.

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Wed Feb 26, 2020 2:28 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 14, 2014 12:09 pm
Posts: 345
loulou2522 wrote:
Hi thorsten,
The new version dated from 13;57 works now on PB 5.72


ListEx::SetState(#List, 4, 1)
The focus is not putting on this column
seems not working maybe i don't use it correctly
Thanks for your dsponibility


Can you see THorsten because i don't arrive to make focus


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Wed Feb 26, 2020 5:38 pm 
Offline
User
User
User avatar

Joined: Fri Jun 07, 2019 1:56 pm
Posts: 77
Hello Thorsten

using ListEx in a dialog for changing colors in a bitmap. First colum shows the color in real. If I set the cursor to any row, this row will be hightlighted (ok thats normal!) But highlighting the complete row kills the color in the first colum.

Is there any chance to:

disable highlighting the complete row?
disable hightlighting first (any) colum in the row?

Thanks in advance for your help.

Tried to insert a picture, but that does not work??!!


**********************************
Problem solved

I use Images 1*1 point with the color!


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Wed Feb 26, 2020 9:29 pm 
Offline
Addict
Addict

Joined: Fri Nov 09, 2012 11:04 pm
Posts: 1807
Location: Uttoxeter, UK
@Thorsten1867,

Thank you for the latest version of ListEX (#Version = 20022503)

First the good news! -- I notice that the (ListEx) ComboBox now works perfectly in OSX. :D

Second my program crashes when the code below is executed:
ListEx::AddItem(#WML_A_List,-1,"")

With the following error:

[20:12:51] Executable started.
[20:12:58] [ERROR] ListExModule.pbi (Line: 3626)
[20:12:58] [ERROR] DrawImage(): The specified 'ImageID' is null.
[20:13:04] The Program was killed.

I have attempted to make a small snippet of code that gives this error but have not yet succeeded, sorry.
What I can say is that if I use an earlier version of ListEx with my program it works ok.
My program also works if I comment out the following code in (#Version = 20022503):
Code:
 3590             If Flags & #Image
               
                imgFlags = ListEx()\Rows()\Column(Key$)\Image\Flags
               
                If imgFlags & #Center
                  imgX  = (dpiX(ListEx()\Cols()\Width) - dpiX(ListEx()\Rows()\Column(Key$)\Image\Width)) / 2
                ElseIf imgFlags & #Right
                  imgX  = dpiX(ListEx()\Cols()\Width)  - dpiX(ListEx()\Rows()\Column(Key$)\Image\Width) - dpiX(4)
                Else
                  imgX = dpiX(4)
                EndIf
               
                imgWidth  = dpiX(ListEx()\Rows()\Column(Key$)\Image\Width) ;+ dpiX(4)
                imgHeight = dpiY(ListEx()\Rows()\Column(Key$)\Image\Height)
                imgY      = (dpiY(ListEx()\Rows()\Height) - dpiY(ListEx()\Rows()\Column(Key$)\Image\Height)) / 2 + dpiY(1)
               
                DrawingMode(#PB_2DDrawing_AlphaBlend)
                DrawImage(ListEx()\Rows()\Column(Key$)\Image\ID, colX + imgX, rowY + imgY, imgWidth, imgHeight)

              ElseIf ListEx()\Cols()\Flags & #Image
               
                imgFlags = ListEx()\Cols()\Image\Flags
               
                If imgFlags & #Center
                  imgX  = (dpiX(ListEx()\Cols()\Width) - dpiX(ListEx()\Cols()\Image\Width)) / 2
                ElseIf imgFlags & #Right
                  imgX  = dpiX(ListEx()\Cols()\Width)  - dpiX(ListEx()\Cols()\Image\Width) - dpiX(4)
                Else
                  imgX = dpiX(4)
                EndIf
               
                imgWidth  = dpiX(ListEx()\Cols()\Image\Width) ; + dpiX(4)
                imgHeight = dpiY(ListEx()\Cols()\Image\Height)
                imgY      = (dpiY(ListEx()\Rows()\Height) - dpiY(ListEx()\Cols()\Image\Height)) / 2 + dpiY(1)
               
                DrawingMode(#PB_2DDrawing_AlphaBlend)
                DrawImage(ListEx()\Cols()\Image\ID, colX + imgX, rowY + imgY, imgWidth, imgHeight)

              EndIf

_________________
DE AA EB


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI) FirstCharacterClear in e
PostPosted: Fri Feb 28, 2020 6:34 pm 
Offline
User
User
User avatar

Joined: Fri Jun 07, 2019 1:56 pm
Posts: 77
Hi Thorsten,

ListEx is great piece of code! Thanks for that!

What I'm missing is a flag for editable fields = FirstCharacterClear

That would be nice, because when you want to edit a field which already has a value/text, you have to clear it with backspace.

Regards
Rainer


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Fri Feb 28, 2020 8:34 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
@davido
I try to intercept the error in the current version.
I suspect that a non-existent image (ImageID = 0!) is passed.

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Fri Feb 28, 2020 8:56 pm 
Offline
Addict
Addict

Joined: Fri Nov 09, 2012 11:04 pm
Posts: 1807
Location: Uttoxeter, UK
@Thorsten1867,
Thank you taking time to check this.

I had assumed that this was not my problem.
This is because the only change made was in the name of the Included ListEx version!

I'll go away and check much more carefully.
If this does turn out to be my problem, please accept my apologies.

_________________
DE AA EB


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI) FirstCharacterClear in e
PostPosted: Sun Mar 01, 2020 12:48 pm 
Offline
User
User
User avatar

Joined: Fri Jun 07, 2019 1:56 pm
Posts: 77
PB_Rainer wrote:
Hi Thorsten,

ListEx is great piece of code! Thanks for that!

What I'm missing is a flag for editable fields = FirstCharacterClear

That would be nice, because when you want to edit a field which already has a value/text, you have to clear it with backspace.

Regards
Rainer


Hi Thorsten,

@all

I tried the following:

init the column = OK:

Code:
ListEx::AddColumn(Palette_ListEx, 6, "Change to color#", 95, "ChangeToColor", ListEx::#Integer | ListEx::#Editable)
ListEx::SetColumnAttribute(Palette_ListEx, 6, ListEx::#Align, ListEx::#Center)


Getting cell-infos after doubleclick = OK:

Code:
Case #PB_Event_Gadget
   Select EventGadget()
      Case Palette_ListEx
         If EventType() = 2
            Palette_ClearEditCell(ListEx::EventRow(Palette_ListEx), ListEx::EventColumn(Palette_ListEx))



Trial to clear the cell = NOT OK:

Code:
Procedure Palette_ClearEditCell(Row.i, Cell.i)
   Protected.s ColumnLabel, ItemText
   
   ColumnLabel = ListEx::GetColumnLabel(Palette_ListEx, Cell)
   ItemText = ListEx::GetItemText(Palette_ListEx, Row, Cell)
   Debug "Row / Cell / ColumnLabel / ItemText " + Row + " / " + Cell + " / " + ColumnLabel + " / " + ItemText
   ListEx::SetCellState(Palette_ListEx, Row, ColumnLabel, ListEx::#Edit)
   ListEx::SetItemText(Palette_ListEx, Row, "", Cell)
EndProcedure


But this trial does not work, tried a lot setitemstate, celldata and so on.
Nothing clears the cell after doubleclick.

Does anyone knows a solution,
can anyone help?

Thanks to all in advance

regards
Rainer


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sun Mar 01, 2020 3:29 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
Update: Flag #StartSelected for columns added.

@PB_Rainer
Try: ListEx::#Editable|ListEx::#StartSelected

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sun Mar 01, 2020 4:51 pm 
Offline
User
User
User avatar

Joined: Fri Jun 07, 2019 1:56 pm
Posts: 77
Thorsten1867 wrote:
Update: Flag #StartSelected for columns added.

@PB_Rainer
Try: ListEx::#Editable|ListEx::#StartSelected


Hi Thorsten,

thanks a lot.

Perfect add, works as wanted and it's better than a real "FirstCharacreClear". Very good that is only marked, so you can still use it if you want. Great!

regards
Rainer


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sun Mar 01, 2020 6:30 pm 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 45
Location: SE England
Hi Thorsten

Is there a way to find out the number of the number of the first row that is visible and how many rows are visible in the gadget?

Thanks.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sun Mar 01, 2020 8:35 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
Update: Attribute #FirstVisibleRow / #VisibleRows

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Wed Mar 04, 2020 12:52 pm 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 45
Location: SE England
Thorsten1867 wrote:
Update: Attribute #FirstVisibleRow / #VisibleRows


Thanks. This is super useful!

Is there any way to detect events from the scrollbar? I can see that it pings an event when the mouse button is release but how can I capture this?


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Wed Mar 04, 2020 1:44 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
I am currently building my own ScrollBar into ListEx, then I could send a corresponding event.

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 438 posts ]  Go to page Previous  1 ... 22, 23, 24, 25, 26, 27, 28 ... 30  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye