Jump to content


Photo

Combobox Question


  • Please log in to reply
12 replies to this topic

#1 Afiag

Afiag
  • Members
  • 117 posts

Posted 05 July 2005 - 06:30 PM

I want to replace all my comboboxes in my application with yours (better visual style)

BUT

I normally use the following code to change the color of the selectioncolor; can this be applied somewhere with your combobox ?


------

procedure TForm1.ComboBox6DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
if odSelected IN State then begin
ComboBox6.Canvas.Brush.Color := SelectionColor;
end;
ComboBox6.Canvas.FillRect(Rect);
ComboBox6.Canvas.TextOut(Rect.Left + 1,Rect.Top,ComboBox6.Items[Index]);
end;

------


As this uses the ownerdraw I'm started to doubt .. but maybe there is another way ?

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 05 July 2005 - 06:46 PM

Hello,

Currently selection color is fixed to clHighlight (Default color in Windows).

Maybe I can add some property named SelectionColor for this, but maybe having non-default color is bad idea (?)

If you want, maybe you can change selection color in my code (in NxPopupControl.pas, Line: 507)

best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Afiag

Afiag
  • Members
  • 117 posts

Posted 05 July 2005 - 06:55 PM

I really don't think it's a bad idea to let the user have some more choice in the visual part of his application...

being able to change the selectioncolor really adds to the overall appearance of the application (well at least mine as I heavily use my own color sheme), if you make a run out of the mill windows type application then everything is fine, but to create a little more style, it wouldn't be a bad feature at all...

In short I would really like a "selectioncolor" property... changing it into the pas file I won't do for the simple reason that that will hardcode it into the component and I like to give my users the oppertunity to change the colors themselves (which I can only do if I can change the color of course)

Let me know if you plan on adding it or not, if you do, I'll be the first to switch all my comboboxes to yours, otherwise I'll keep using the ones I have.

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 05 July 2005 - 07:06 PM

Hello,

I will probably add , for next release.

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 Afiag

Afiag
  • Members
  • 117 posts

Posted 05 July 2005 - 07:08 PM

No problem, I don't need this "right away" but I can work around the idea of being able to get that property later on and continue on other areas of my application smile.gif

#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 05 July 2005 - 07:11 PM

Hello,

I have added it, it was easy smile.gif

It will be ready for next release.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#7 Afiag

Afiag
  • Members
  • 117 posts

Posted 08 July 2005 - 11:08 AM

Hey, any word on the release shedule for the next minor release ? Otherwise you may send the .pas file of the file concerned to this problem if you fixed this, so that I can use it and report any problems (if any) before you publish it openly smile.gif

#8 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 08 July 2005 - 05:35 PM

Hello,

I will send you .pas file today.

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#9 Afiag

Afiag
  • Members
  • 117 posts

Posted 09 July 2005 - 01:22 PM

Hey

Tnx for the file, exactly what I wanted, good work!

One other thing that's probably as easy but would help me a lot, for the combobox component, a property called:

HighlightTextColor

You already use this on your grids and it would be nice to get this in the combobox component to, why ? because when you change windows styles it changes that color which then sometimes corresponds bad with the chosen selectioncolor smile.gif so I guess that if you can do it for the grid you could do it for the combobox to ?

Let me know, would be great smile.gif

#10 Afiag

Afiag
  • Members
  • 117 posts

Posted 09 July 2005 - 01:45 PM

Hey after extensive use of the component and testing all possible configurations I come up with the following thing that (for me) would make this "the perfect combobox"

4 things in order of importance smile.gif I would love to help you out if I could with things like this but although I know a fair share of delphi programming I never changed components before ... and I think it's best you keep control of your components so that everyone can enjoy the benefits of the changes presented here...

- BIG Problem: The anchors don't work correctly ... (start overlapping each other etcetera) nothing more to add, but as all my components reform based on the anchors to always display everything correctly scaled, this is a make or break feature that forces me to not being able to use the nxcombobox... this is definately the most important problem I encountered...

- HighlightTextColor (see previous post)

- Make it so the color of the combobox stays Combobox.Color, what I mean with this is that when you dropdown the combobox, the items are on a white background, while I would like that the background gets the same color as the Combobox.Color property (so the color of the combobox in closed state) - I think everybody would want it this way, but if you are not sure, you maybe can insert a " DropDownColor " or something...

- HideFocus on dsDropDownList, When you use dsDropDownList the HideFocus property doesn't work

- Least important but anoying is the last thing, when I select win9x style in Windows XP (or use Windows 98 / ME to view the application) it turns on Ctl3D for the combobox, or in other words it changes the combobox to default windows style instead of the style I see in my Delphi and on XP style windows...

hmm turned out there were 5 probsies smile.gif well let me know what can be done, either immidiately (codewise or settings I overlooked), or on the short term (quick fix) or planned feature for the long term shedule..

Thanks a lot smile.gif

#11 Afiag

Afiag
  • Members
  • 117 posts

Posted 09 July 2005 - 11:41 PM

hey boki, you can scrap this problem :

----------------------------
- BIG Problem: The anchors don't work correctly ... (start overlapping each other etcetera) nothing more to add, but as all my components reform based on the anchors to always display everything correctly scaled, this is a make or break feature that forces me to not being able to use the nxcombobox... this is definately the most important problem I encountered...
----------------------------

It seems to originate from code, so this is not a issue (luckely as this was my most important concern smile.gif)

I do hope you can fix some of the other things mentioned...

#12 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 10 July 2005 - 01:22 AM

Hello,

I will see what I can do about all this smile.gif

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#13 Afiag

Afiag
  • Members
  • 117 posts

Posted 10 July 2005 - 01:30 PM

okay, keep me updated on any progress... I switched all my comboboxes to yours so definately let me know when you fix one of the problems (and you may always send me the pas files to test it out smile.gif)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users