Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.pascal.delphi.misc > #218

Re: A DBGrid with a clickable button

From GS <gs@somewhere.net>
Newsgroups comp.lang.pascal.delphi.misc
Subject Re: A DBGrid with a clickable button
Date 2012-02-13 10:40 -0500
Organization A noiseless patient Spider
Message-ID <jhbatk$ti5$1@dont-email.me> (permalink)
References <4f37e08c$0$1380$4fafbaef@reader2.news.tin.it> <LgSZq.19832$E07.16639@newsfe10.iad> <4f384694$0$1389$4fafbaef@reader2.news.tin.it> <F5_Zq.12679$j%3.9313@newsfe04.iad> <4f39149e$0$1385$4fafbaef@reader2.news.tin.it>

Show all headers | View raw


Stark was thinking very hard :
>>
>>    I only assumed you wanted the button to raise as you lifted your mouse 
>> button? Now it seems you want a toggle action?
>>
>>    If the DataType boolean isn't changing state then how would you
>> expect it to redraw anything but the same thing, over and over again?
>>
>>    If infact the DataType value is changing when you click there, then you 
>> need another DrawFrameCOntrol in a raise state when the DataType is
>> false.  I see that you are only drawing one state there and most likely the 
>> form isn't getting a Invalidate to repaint that area otherwise.
>>
>>   Put a Beep in the event code to see if your clicks are even reaching it 
>> all the time.. It is possible the canvas thinks you don't need to
>> update there and there for, it does not always get called.
>>
>> Jamie
>>
> Sorry for my english, but I don't want a toggle action. I just want a 
> clickable button, that is a button that when clicked just blinks and stays as 
> it is. What happens is that when I click the button becomes pushed and stays 
> pushed. If I click a button in another row, this will become pushed, and the 
> previous is raised. It is not what I want. In fact I wanted to give the user 
> a way to choose one of the rows of the DBGrid and push its button to act on 
> that row. I may find another way, for example a single external button; the 
> user can highlight a row and then push this single button.
> I just wanted what I thought was a more intuitive interface for the user..

Just a thought...

Intuitively, most users would expect a menu/toolbar/button to act on a 
selection of the grid, whether it be a single cell or a range. What 
they would not expect is to find a button in the grid as might be done 
with a spreadsheet, for example, using Form or ActiveX controls.

I use Farpoint's Spread.ocx in place of any control where I want a grid 
or multi-columns. I know there's a similar control available for Delphi 
but I don't know if it hosts buttons as does the Spread.ocx! 
Regardless, I don't like putting buttons on a spreadsheet because they 
don't stay put after hiding rows/cols without tonnes of positioning 
code. Might seem trivial for a few buttons but not how I want to work 
with dozens of them! It's easier to make cells 'look/behave' like 
buttons and use a 'SelectionChange' event to fire their respective 
procedures.

-- 
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc

Back to comp.lang.pascal.delphi.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

A DBGrid with a clickable button "Stark" <franco.jommi@tin.it> - 2012-02-12 16:54 +0100
  Re: A DBGrid with a clickable button Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@charter.net> - 2012-02-12 12:07 -0500
    Re: A DBGrid with a clickable button "Stark" <franco.jommi@tin.it> - 2012-02-13 00:09 +0100
      Re: A DBGrid with a clickable button Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@charter.net> - 2012-02-12 21:01 -0500
        Re: A DBGrid with a clickable button "Stark" <franco.jommi@tin.it> - 2012-02-13 14:48 +0100
          Re: A DBGrid with a clickable button GS <gs@somewhere.net> - 2012-02-13 10:40 -0500
          Re: A DBGrid with a clickable button Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@charter.net> - 2012-02-13 17:48 -0500
            Re: A DBGrid with a clickable button "Stark" <franco.jommi@tin.it> - 2012-02-14 12:11 +0100
      Re: A DBGrid with a clickable button Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2012-02-13 09:50 +0100

csiph-web